-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Tweak debug info lookup to ignore dladdr result where it cannot be trusted #22549
Conversation
src/debuginfo.cpp
Outdated
*context = NULL; | ||
*slide = 0; | ||
*section_slide = 0; | ||
// On Windows and FreeBSD, `dladdr` (or it's equivalent) returns the closest exported symbol |
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.
its
src/debuginfo.cpp
Outdated
// when better result is available through other methods. | ||
// macOS's `dladdr` returns local symbols and Linux's `dladdr` | ||
// checks the symbol size so they do not have this problem. | ||
// On systems with a untrusted dladdr, the result cannot be used for sysimg |
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.
an untrusted
This PR builds successfully on FreeBSD CI: https://julia.iblis.cnmc.tw/#/builders/2/builds/106 |
Update README as well diff --git a/README.md b/README.md
index 34bf2ac71f..4dcf304f58 100644
--- a/README.md
+++ b/README.md
@@ -256,7 +256,6 @@ Some known issues on FreeBSD are:
* The x86 architecture does not support threading due to lack of compiler runtime library support, so you may need to
set `JULIA_THREADS=0` in your `Make.user` if you're on a 32-bit system.
-* Some stack trace information is not available due to differences with libunwind.
### Windows |
Similar to windows' `SymFromAddr` it only find the closest exported symbol without checking symbol size and can therefore return incorrect result for local functions. Also reorganize the code so that the function name and base lookup is always down even when the LLVM object lookup failed.
Similar to Linux. The LLVM fallback is currently not working on FreeBSD for some reason. Fix: #20798
e0eb9c3
to
3891cca
Compare
That link return 504 for me but I'll take your word that it works and merge when the CI finishes again.... |
@yuyichao seems my server crashed 8 hr ago... |
Should disable broken linfo lookup on FreeBSD due to difference in
dladdr
behavior (none of the three platforms we support building that hasdladdr
have the same behavior.....).Enable
libunwind
lookup code path since apparently that works on FreeBSD too.Fix: #20798