[PATCH] Implement variable-sized alloca instrumentation.

Kostya Serebryany kcc at google.com
Fri Nov 21 13:31:58 PST 2014


I've run the new feature on the chromium sources and it produced a compiler failure: 

reduced test: 
% cat a.c 
int a;
int b;
int c;
void fn3(int *, int);
void fn1 () {
  int d = b && c;
  int e[a];
  int f;
  if (d)
    fn3 (&f, sizeof 0 * (&c - e));
}
% clang -fsanitize=address -mllvm -asan-instrument-allocas -O2 a.c
Instruction does not dominate all uses!
  %54 = add i64 %53, 2147450880
  %68 = sub i64 %54, 4
Instruction does not dominate all uses!
  %35 = add i64 %34, 2147450880
  %69 = inttoptr i64 %35 to i32*
Instruction does not dominate all uses!
  %54 = add i64 %53, 2147450880
  %71 = inttoptr i64 %54 to i32*
fatal error: error in backend: Broken function found, compilation aborted!
clang-3.6: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 3.6.0 (trunk 222567)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang-3.6: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang-3.6: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.6: note: diagnostic msg: /tmp/a-2b96e4.c
clang-3.6: note: diagnostic msg: /tmp/a-2b96e4.sh
clang-3.6: note: diagnostic msg: 

********************

http://reviews.llvm.org/D6055






More information about the llvm-commits mailing list