https://llvm.org/bugs/show_bug.cgi?id=30843

            Bug ID: 30843
           Summary: clang -fsanitize breaks initial stdio stream
                    orientation
           Product: compiler-rt
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: compiler-rt
          Assignee: unassignedb...@nondot.org
          Reporter: sylves...@debian.org
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

Reported here https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784222

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to