ramosian-glider / sanitizers

0 stars 0 forks source link

implement adaptive redzones #9

Open ramosian-glider opened 9 years ago

ramosian-glider commented 9 years ago

Originally reported on Google Code with ID 8

When instrumenting global arrays, we add fixed-size redzones (32 bytes) to them.
If the array has two or more dimensions, we're likely to miss the redzone even if the
array index is off by one:

char arr[40][40];
char arr2[40];

arr[40][0] = 'a';  // this will hit arr2

We may want to vary the size for two-dimensional arrays depending on their sizes.

Reported by ramosian.glider on 2011-10-14 18:51:22

ramosian-glider commented 9 years ago

Reported by ramosian.glider on 2011-10-14 18:51:47

ramosian-glider commented 9 years ago
We may want to implement adaptive redzones for globals and for heap. 
Maybe even for stack. 
The hypothesis is that large objects tend to be overflown by larger amounts. 
I don't think this should have anything to do with two-dimensional arrays. 

Reported by konstantin.s.serebryany on 2011-10-31 17:44:34

ramosian-glider commented 9 years ago

Reported by ramosian.glider on 2012-02-02 12:14:56

ramosian-glider commented 9 years ago
- adaptive redzones for globals are committed as LLVM r173335/r173336
- adaptive redzones for heap are a part of the new asan allocator

Need to think what to do with stack. 

Reported by konstantin.s.serebryany on 2013-01-24 10:38:29

ramosian-glider commented 9 years ago

Reported by ramosian.glider on 2013-02-07 16:02:20

ramosian-glider commented 9 years ago
A somewhat related problem: http://llvm.org/bugs/show_bug.cgi?id=16277
(can't handle stack objects aligned by more than 32 bytes).
This may potentially be solved together with adaptive redzones for stack. 

Reported by konstantin.s.serebryany on 2013-06-26 09:56:57

ramosian-glider commented 9 years ago
Fixed, see https://code.google.com/p/address-sanitizer/issues/detail?id=245#c2

Reported by konstantin.s.serebryany on 2013-12-06 09:12:55

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

Reported by ramosian.glider on 2015-07-30 09:12:57