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][BZ 14594] Demangle function pointers before testing them


Jeff Law <law@redhat.com> writes:

> You're still missing my point.

No, I don't.  Your patch is just wrong.  I wonder how you tested it.

> I see your point, namely that because a NULL clear pointer is not mangled
> an additional test is necessary.  ie the code really needs to do this:
>
> if (ptr != NULL)
>   DEMANGLE (ptr);
>
> if (ptr != NULL)
>   *(ptr) (args);

How does that fix your original problem?

> And how do you propose to do that, keeping in mind architectures where
> functions can start on a byte boundary and can live virtually anywhere in
> the address space?

Every architecture that currently implements pointer mangling has
function addresses aligned to some boundary (even if only by
convention).

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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