Last active
August 29, 2015 14:20
-
-
Save ewxrjk/c3f80a16d61c35678301 to your computer and use it in GitHub Desktop.
clang -fsanitize=address breaks initial stream orientation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
richard@deodand:~/junk$ cat t.c | |
#include <stdio.h> | |
#include <wchar.h> | |
int main(void) { | |
FILE *fp = fopen("/dev/null", "r"); | |
return printf("initial orientation: %d\n", fwide(fp, 0)); | |
} | |
richard@deodand:~/junk$ clang-3.6 -fsanitize=address -o t t.c | |
richard@deodand:~/junk$ ./t | |
initial orientation: -1 | |
richard@deodand:~/junk$ clang-3.6 -o t t.c | |
richard@deodand:~/junk$ ./t | |
initial orientation: 0 | |
richard@deodand:~/junk$ gcc -o t t.c | |
richard@deodand:~/junk$ ./t | |
initial orientation: 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment