-
Notifications
You must be signed in to change notification settings - Fork 63
Implement stacktraces in Sys::Drop()/Error() #1741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Thanks a lot! |
6d571de
to
9528fb2
Compare
13e2395
to
f3c1a28
Compare
Seriously? WTF is this garbage? |
GCC failure is unrelated, and for some reason using |
aed5b79
to
409027e
Compare
I give up trying to fix that piece of shit. Either we NUKE the unsafe vec3 functions or accept the CI not using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we should fix that vector load thing anyway. It could theoretically cause a segfault if the vector is right against a page boundary.
src/common/StackTrace.h
Outdated
|
||
std::string file = entry.source_file(); | ||
|
||
size_t pos = std::min( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might be interested in chopping the baths at build time rather instead of munging them at runtime. You can chop off the path names using the flags -fmacro-prefix-map
for GCC and /d1trimfile
for MSVC. So if you want to start from src
you can put -fmacro-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}/src=.
for GCC-like, and for MSVC you do it like this:
string(REPLACE "/" "\\" backslashed_dir ${CMAKE_CURRENT_SOURCE_DIR}/src)
add_compile_options("/d1trimfile:${backslashed_dir}")
The flags can be repeated so you could do it for both Daemon and Unvanquished roots.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been trying this with msvc, but it doesn't seem to work with gamemodule paths for some reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With GCC it did not work at all for me.
Seems not a lot of packages contain libc++_backtrace. Trixie appears to have it in some of the packages. I might check at a later point if it's viable to build it and/or libc++exp for external_deps, but for now I think it's fine to not do so. Probably also need to check which of the 2 libs is present, since it's preferred to use libc++exp, but it might not be available. |
Something with a C++ interface is probably not viable for external_deps |
0fc955c
to
cc1410d
Compare
2d2bca8
to
84796ac
Compare
Yeah. |
ee55d7c
to
91acbfd
Compare
MinGW is spewing garbage:
|
2132726
to
241cb0e
Compare
Requires #1719
Adds stacktraces from
<stacktrace>
toSys::Drop()/Error()
, to help with debugging.