You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "undefined" sanitizer appears to nullify issues otherwise identified by -Wuninitialized
could that be documented somewhere
Example program below after the output. I'm using GCC 8.2.0
$ gcc -Wall -fsanitize=signed-integer-overflow,leak,undefined,address -o undef undef.c
jonny@asus:/code$ ./undef
undef.c:18:15: runtime error: load of value 136, which is not a valid value for type '_Bool'
jonny@asus:/code$ gcc -Wall -fsanitize=signed-integer-overflow,leak,address -o undef undef.c
undef.c: In function ‘main’:
undef.c:18:15: warning: ‘a.unset.hello’ is used uninitialized in this function [-Wuninitialized]
if(a.unset.hello)
~~~~~~~^~~~~~
The "undefined" sanitizer appears to nullify issues otherwise identified by -Wuninitialized
could that be documented somewhere
Example program below after the output. I'm using GCC 8.2.0
$ gcc -Wall -fsanitize=signed-integer-overflow,leak,undefined,address -o undef undef.c
jonny@asus:
/code$ ./undef/code$ gcc -Wall -fsanitize=signed-integer-overflow,leak,address -o undef undef.cundef.c:18:15: runtime error: load of value 136, which is not a valid value for type '_Bool'
jonny@asus:
undef.c: In function ‘main’:
undef.c:18:15: warning: ‘a.unset.hello’ is used uninitialized in this function [-Wuninitialized]
if(a.unset.hello)
~~~~~~~^~~~~~
// gcc -Wall -fsanitize=signed-integer-overflow,leak,undefined,address -o undef undef.c
#include <stdbool.h>
struct b
{
bool hello;
};
struct t
{
struct b unset;
};
int main()
{
struct t a;
}
The text was updated successfully, but these errors were encountered: