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] |
Jeff Law <law@redhat.com> writes:You're still missing my point. If the clear pointer is _NOT_ NULL and the mangling function produces a NULL result, then the existing tests will do the wrong thing.
The problem is the code is testing the mangled pointer against null which is blatently wrong
No, it is perfectly correct: the NULL pointer is never mangled in the first place. Demangling the NULL pointer will never result in a NULL pointer, and all you get is a crash.
if (ptr != NULL) DEMANGLE (ptr);
if (ptr != NULL) *(ptr) (args);
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?
That is trivial. Just make sure the canary is never a valid pointer (you lose a bit of randomness, but that should not be a problem).
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |