Comment #2 on issue 323 by [email protected]: AddressSanitizer:
double-free with zero-length XHR, depending on behavior of realloc(p, 0)
http://code.google.com/p/address-sanitizer/issues/detail?id=323
inferno@, I am not convinced yet that your test case demonstrates a bug in
asan.
The same test case fails with plain glibc:
% cat ~/tmp/realloc-test.cc
#include <stdlib.h>
#include <stdio.h>
int main() {
void *p = realloc(NULL, 0);
if (!p)
return 1;
fprintf(stderr, "p : %p\n", p);
void* newp = realloc(p, 0);
fprintf(stderr, "newp: %p\n", p);
if (!newp)
{
free(p);
return 1;
}
}
% g++ ~/tmp/realloc-test.cc && ./a.out
p : 0x1461010
newp: 0x1461010
*** glibc detected *** ./a.out: double free or corruption (fasttop):
0x0000000001461010 ***
gkwong@, I can not access the mozilla bug.
Please provide a small reproducer here, if possible.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.