This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] hppa: avoid NULL dereference of sym_map in elf_machine_rela()
- From: Roland McGrath <roland at hack dot frob dot com>
- To: John David Anglin <dave dot anglin at bell dot net>
- Cc: Aaro Koskinen <aaro dot koskinen at iki dot fi>, Carlos O'Donell <carlos at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 31 Oct 2014 19:35:59 -0700 (PDT)
- Subject: Re: [PATCH] hppa: avoid NULL dereference of sym_map in elf_machine_rela()
- Authentication-results: sourceware.org; auth=none
- References: <1414791231-30990-1-git-send-email-aaro dot koskinen at iki dot fi> <20141031214255 dot 8FFB12C3ACC at topped-with-meat dot com> <20141031223801 dot GA17511 at drone dot musicnaut dot iki dot fi> <BLU436-SMTP91D615856A23994E55223E979A0 at phx dot gbl>
Oh, yeah. abort is the generic fallback for __builtin_trap. Certainly
just supporting __builtin_trap directly in a compiler backend (with no
outcall) is best. But this issue might come up in other places or affect
other machines, and the set of machines and compilers we support for
building libc today most likely includes others that don't have a proper
__builtin_trap.
So we might as well fix abort in rtld. We already have __assert_fail in
elf/dl-minimal.c for similar issues with enabling assert in rtld. We could
just add an abort there. It would be ideal to avoid any actual abort calls
in our own source code sneaking into rtld, because it's far better if
they're _dl_fatal_printf so there's a message. But I can't think of a
reasonable way to make compiler-generated abort calls link while preventing
explicit abort calls in the source from linking, so we can live without
that ideal.