This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Ensure DSO_FILENAME does not dereference NULL.


On Tue, Nov 12, 2013 at 1:35 PM, Marcus Shawcroft
<marcus.shawcroft@linaro.org> wrote:
> 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.

I am testing the patch for aarch64 back-end which uses "brk #0"
instruction.  I filed
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59091 for the arm back-end
issue.
I agree that we should fix glibc also due to your analysis below.

Thanks,
Andrew Pinski

>
> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]