This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Ensure DSO_FILENAME does not dereference NULL.
- From: Marcus Shawcroft <marcus dot shawcroft at linaro dot org>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 12 Nov 2013 21:35:17 +0000
- Subject: Re: [PATCH] Ensure DSO_FILENAME does not dereference NULL.
- Authentication-results: sourceware.org; auth=none
- References: <CABXK9ndMvnpRArWGU4-JWgiePLOXNs74AuK9C6dm0J1Gyu+k_A at mail dot gmail dot com> <167D67C8-67D3-4BAD-B4A2-53ADC9FAE3EB at gmail dot com>
On 12 November 2013 18:27, <pinskia@gmail.com> wrote:
>> One effect of this patch is to replace unreachable paths with a call to abort().
>
> Hmm, it calls __builtin_trap shouldn't GCC back end for both arm and aarch64 support that directly instead?
Yep, I agree both gcc backends should get support for
__builtin_trap(), (Ill make sure a patch appears shortly), but I think
that this and the related patch I posted earlier for glibc both still
stand.
In the case of this patch, given:
#define DSO_FILENAME(name) ((name)[0] ? (name) : (rtld_progname ?:
"<main program>"))
...
const char *reference_name = undef_map ? undef_map->l_name : NULL;
_dl_signal_cerror (0, DSO_FILENAME (reference_name), .... )
the attempt to give NULL to DSO_FILENAME() when undef_map == NULL is wrong.
Cheers
/Marcus