Hi,

I noted some unexpected behaviour by asan. See this simple example:
int a[1]={0};
int main() {
        int b=a[1];
}

A trivial out of bounds array access to a.
As expected compiling and running with asan will report a
global-buffer-overflow. However if you change it to this:
int a[1];
int main() {
        int b=a[1];
}
asan will let it pass without an error.


The only difference is if the global array a is pre-initialized with a
value or not.

Is this somehow expected or a known limitation of asan or is this a bug?

cu,
-- 
Hanno Böck
http://hboeck.de/

mail/jabber: [email protected]
GPG: BBB51E42

-- 
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.

Attachment: pgpkR5t720IYu.pgp
Description: OpenPGP digital signature

Reply via email to