viralcode / address-sanitizer

Automatically exported from code.google.com/p/address-sanitizer
1 stars 0 forks source link

No redzones for weak symbols #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
ASan does not catch global buffer overflow in the following example:

#include <stdio.h>

__attribute__((weak)) char zz[10] = "012345678";

int main(void) {
        for (int i = 0; i < 11; ++i) {
                zz[i] = '5';
        }
        printf("%s\n", zz);
        return 0;
}

Original issue reported on code.google.com by euge...@google.com on 7 Oct 2011 at 7:22