Skip to content
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

Merged
merged 2 commits into from
Jun 27, 2017

Conversation

yuyichao
Copy link
Contributor

Should disable broken linfo lookup on FreeBSD due to difference in dladdr behavior (none of the three platforms we support building that has dladdr have the same behavior.....).

Enable libunwind lookup code path since apparently that works on FreeBSD too.

Fix: #20798

*context = NULL;
*slide = 0;
*section_slide = 0;
// On Windows and FreeBSD, `dladdr` (or it's equivalent) returns the closest exported symbol
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its

// 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an untrusted

@iblislin
Copy link
Member

This PR builds successfully on FreeBSD CI: https://julia.iblis.cnmc.tw/#/builders/2/builds/106
Thanks!

@iblislin
Copy link
Member

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

yuyichao and others added 2 commits June 27, 2017 05:21
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
@yuyichao yuyichao force-pushed the yyc/local_function_lookup branch from e0eb9c3 to 3891cca Compare June 26, 2017 21:23
@yuyichao
Copy link
Contributor Author

That link return 504 for me but I'll take your word that it works and merge when the CI finishes again....

@iblislin
Copy link
Member

@yuyichao seems my server crashed 8 hr ago...

@ararslan ararslan merged commit ec39405 into master Jun 27, 2017
@ararslan ararslan deleted the yyc/local_function_lookup branch June 27, 2017 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants