Skip to content

Commit

Permalink
Don't assume libunwind can always find a function pointer. (#24023)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyichao authored and vtjnash committed Oct 6, 2017
1 parent af5abb3 commit 9566771
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/debuginfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,9 @@ static void get_function_name_and_base(const object::ObjectFile *object, bool in
if (needs_saddr) {
#if (defined(_OS_LINUX_) || defined(_OS_FREEBSD_)) && !defined(JL_DISABLE_LIBUNWIND)
unw_proc_info_t pip;
if (unw_get_proc_info_by_ip(unw_local_addr_space, pointer, &pip, NULL) == 0) {
// Seems that libunwind may return NULL IP depending on what info it finds...
if (unw_get_proc_info_by_ip(unw_local_addr_space, pointer,
&pip, NULL) == 0 && pip.start_ip) {
*saddr = (void*)pip.start_ip;
needs_saddr = false;
}
Expand Down

2 comments on commit 9566771

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

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

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

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

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan

Please sign in to comment.