Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find unaligned partially OOB accesses #101

Closed
ramosian-glider opened this issue Aug 31, 2015 · 2 comments
Closed

find unaligned partially OOB accesses #101

ramosian-glider opened this issue Aug 31, 2015 · 2 comments

Comments

@ramosian-glider
Copy link
Member

Originally reported on Google Code with ID 101

Currently, asan does not detect unaligned partially OOB accesses:
int *x = new int[2]; // 8 bytes: [0,7].
int *u = (int*)((char*)x + 6);
*u = 1;  // Access to range [6-9]

rnk's idea: mark the last 8 bytes with the shadow value '8' instead of '0'. 

This will have two performance problems: 
 (minor) slow path will be taken more frequently for 1-, 2-, and 4-byte accesses
 (major) 8-byte accesses will need slow path too (same for 16- and 32-byte accesses)

If we use larger shadow granularity (16:1 or 32:1 shadow) this will be less of a problem.


Anyway, this is something to try and evaluate. 

Reported by konstantin.s.serebryany on 2012-08-13 17:52:39

@ramosian-glider
Copy link
Member Author

Reported by konstantin.s.serebryany on 2012-08-13 17:54:53

@ramosian-glider
Copy link
Member Author

Adding Project:AddressSanitizer as part of GitHub migration.

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

  • Labels added: ProjectAddressSanitizer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant