I'm getting a segfault when setting LD_DEBUG=all
The segfault occurs because we end up doing something equivalent to
I't quite possible that this is a bug elsewhere, but given this routine is
specifically for debugging purposes it sems sensible to make it robust to
Created attachment 438 [details]
Patch to fix bug
Fixes bug by printing "(null)" as appropriate, like normal printf does.
This report lacks a test case. If this is an arm-specific problem, please
figure out whether it happens only in some arm-specific code.
Note that Target is a meaningless field for libc.
If you want to indicate the platform of interest, that's Host.
This happened with an internal modified version of glibc, and only
occurred because another bit of glibc was broken.
However tracking down that bug would probably have been easier if
_dl_debug_printf didn't segfault. Tracking back a fault is much easier when
you can see the debug output going wrong, rather than trying to deal with
segfaults on a target without a working gdb.
The issue is not specific to a particular target.
In most case, passing NULL to _dl_debug_printf("%s") is glibc's bug.
It's small improvement for such a special case. Committers,
please judge to put it or not.
I don't think it's warranted. It seems as likely to mask a bug as to make