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


On 09/20/2012 03:46 PM, Andreas Schwab wrote:
Jeff Law <law@redhat.com> writes:

The problem is find_module tests the *mangled* pointer against NULL;

Which is correct, since the NULL pointer is never mangled.
Huh? I think you're misunderstood something Andreas.

The intent of the code is to not use the function pointer for an indirect call if the clear pointer (to use Rich's term) is null. That makes perfect sense.

The problem is the code is testing the mangled pointer against null which is blatently wrong -- unless you can always guarantee that the mangling will never produce a zero result given a nonzero input.



jeff


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