ramosian-glider / sanitizers

0 stars 0 forks source link

asan should support variable-sized alloca #139

Open ramosian-glider opened 9 years ago

ramosian-glider commented 9 years ago

Originally reported on Google Code with ID 138

Currently, the LLVM instrumentation pass simply ignores the non-constant allocas: 
% cat alloca.c 
#include <stdlib.h>
void foo(char *x);
int bar(int n, int m) {
  char *x = alloca(n);
  foo(x);
  return x[m];
}
% clang -fsanitize=address -O2 -S -o - -emit-llvm  alloca.c 2>&1 | head -20 
...
define i32 @bar(i32 %n, i32 %m) nounwind uwtable address_safety {
entry:
  %conv = sext i32 %n to i64
  %0 = alloca i8, i64 %conv, align 1
  call void @foo(i8* %0) nounwind
...

Reported by konstantin.s.serebryany on 2012-12-17 13:28:27

ramosian-glider commented 9 years ago
Issue 347 has been merged into this issue.

Reported by konstantin.s.serebryany on 2014-09-29 21:03:50

ramosian-glider commented 9 years ago
Hi,

I'm starting the task implementation.

Reported by chefMax7 on 2014-10-24 08:26:47

ramosian-glider commented 9 years ago

Reported by ramosian.glider on 2015-07-30 09:05:31

ramosian-glider commented 9 years ago
Adding Project:AddressSanitizer as part of GitHub migration.

Reported by ramosian.glider on 2015-07-30 09:06:55

ramosian-glider commented 9 years ago
Alloca has been added to Clang so perhaps we can close this?

Reported by tetra2005x on 2015-08-24 07:39:15