Bug#784222: clang -fsanitize breaks initial stdio stream orientation

Richard Kettlewell rjk at greenend.org.uk
Mon May 4 08:12:48 UTC 2015


Package: clang-3.6
Version: 1:3.6-2

I'm not sure if this is a bug in Clang or in Glibc.

richard at 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 at deodand:~/junk$ clang-3.6 -fsanitize=address -o t t.c
richard at deodand:~/junk$ ./t
initial orientation: -1
richard at deodand:~/junk$ clang-3.6 -o t t.c
richard at deodand:~/junk$ ./t
initial orientation: 0
richard at deodand:~/junk$ gcc -o t t.c
richard at deodand:~/junk$ ./t
initial orientation: 0

ii  clang-3.6      1:3.6-2      i386         C, C++ and Objective-C
compiler (
ii  gcc-4.9        4.9.2-16     i386         GNU C compiler
ii  libc6:i386     2.19-18      i386         GNU C Library: Shared libraries

(I would check with clang-3.7 but #779785.)

ttfn/rjk



More information about the Pkg-llvm-team mailing list