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] hppa: avoid NULL dereference of sym_map in elf_machine_rela()


On 31-Oct-14, at 6:38 PM, Aaro Koskinen wrote:

Rather, the right solution is probably to find (or add) some switch to GCC
that changes what it emits from being a call to abort to be something
different. It's possible that abort is OK and we just need to define an
appropriately minimal abort in rtld.  But it needs to be looked into.

The other quick workaround I could find is -fno-delete-null-pointer- checks.

"[...] other optimization passes in GCC use this flag to control global dataflow analyses that eliminate useless checks for null pointers [...]"

This suggests that GCC deletes a null check that is useful.

The attached patch implements a trap insn and __builtin_trap(). It generates a conditional trap (SIGFPE). Carlos has used another instruction that generates
an illegal instruction trap.

Dave
--
John David Anglin	dave.anglin@bell.net


Attachment: pa.md.d.txt
Description: Text document


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