[PATCH] Fix DSTs with static applications (Bug 23462).

Carlos O'Donell carlos@redhat.com
Sat Jul 28 01:50:00 GMT 2018


After commit d1d5471579eb0426671bf94f2d71e61dfb204c30 we no longer check
to see if the link map passed to DL_DST_REQUIRED is NULL or not.  This
is a problem becuase in _dl_init_paths we do not set the link map to
anything in the !SHARED case, and this is a bug.  With the work done to
setup link maps in both static and shared builds we can always rely on
the link map.  The fix is to always set the link map, and assert that it
is not NULL.  Setting the link map allows the use of _dl_main_map link
map to be used and results in DSTs being correctly processed.  We add
one regression test tst-dst-static.c just to look for the crash, but we
need to add a larger set of tests for DSTs, but as noted in the DST
cleanup changes this needs the test-in-container framework to go in
first.

No regressions on x86_64.

Signed-off-by: Carlos O'Donell <carlos@redhat.com>

OK for 2.29 when it opens? I don't want to touch 2.28 with this change,
and it's a long standing bug. I'd like to test this change out in Fedora
Rawhide for a while to make sure I didn't miss anything.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-DSTs-with-static-applications-Bug-23462.patch
Type: text/x-patch
Size: 6879 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20180728/bb7ab976/attachment.bin>


More information about the Libc-alpha mailing list