Open mcourteaux opened 1 week ago
What C++ compiler and version are you using?
It's a standard function call, but I think we're doing the equivalent of -fomit-frame-pointer, because that's the default behavior for O3. I can't figure out how to turn it off though in the LLVM API...
It's a standard function call, but I think we're doing the equivalent of -fomit-frame-pointer, because that's the default behavior for O3.
Yeah, but then why does the stack trace work within the AOT-compiled pipeline and AOT-compiled runtime? It makes me think that only the entry-code is doing something weird regarding frame-pointers.
What C++ compiler and version are you using?
My project (and I believe Halide too) is being compiled with this:
❯ clang-18 --version
clang version 18.1.8 (Fedora 18.1.8-1.fc40)
Target: x86_64-redhat-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Configuration file: /etc/clang/x86_64-redhat-linux-gnu-clang.cfg
I'm using
x86-64-linux
AOT-generated pipelines, statically linked in my binary. When I hit ahalide_assert()
, while running in the debugger, a backtrace never shows me where this function was actually called. It seems that calling conventions are not respected, and thus backtrace algorithms fail. I get something like this:So everything until frame
#7
seems fine, but afterwards is total gibberish. Note that the function does correctly return and there is no bugs in control flow. It's just not debuggable if you can't go to the call-site.