Skip to content

Commit

Permalink
Don't crash on unresolved weak symbol reference when auditing.
Browse files Browse the repository at this point in the history
(cherry picked from commit b32b8b4)
  • Loading branch information
Ulrich Drepper authored and Andreas Schwab committed Jun 1, 2010
1 parent 6155a84 commit a0ba5de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2010-05-21 Ulrich Drepper <drepper@redhat.com>

* elf/dl-runtime.c (_dl_profile_fixup): Don't crash on unresolved weak
symbol reference.

2010-05-19 Andreas Schwab <schwab@redhat.com>

* elf/dl-runtime.c (_dl_fixup): Don't crash on unresolved weak
Expand Down
5 changes: 3 additions & 2 deletions elf/dl-runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,9 @@ _dl_profile_fixup (
? LOOKUP_VALUE_ADDRESS (result)
+ defsym->st_value : 0);

if (__builtin_expect (ELFW(ST_TYPE) (defsym->st_info)
== STT_GNU_IFUNC, 0))
if (defsym != NULL
&& __builtin_expect (ELFW(ST_TYPE) (defsym->st_info)
== STT_GNU_IFUNC, 0))
value = ((DL_FIXUP_VALUE_TYPE (*) (void))
DL_FIXUP_VALUE_ADDR (value)) ();
}
Expand Down

0 comments on commit a0ba5de

Please sign in to comment.