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

Left OOB accesses on new[]-allocated arrays with array cookies are not detected #314

Closed
ramosian-glider opened this issue Sep 1, 2015 · 7 comments

Comments

@ramosian-glider
Copy link
Member

Originally reported on Google Code with ID 314

Left OOB accesses on new[]-allocated arrays with array cookies are not detected

Repro:
----------------------
struct C { 
  int x;
  ~C() {}
};

int main() {
  C *buffer = new C[42];
  buffer[-2].x = 42; 
  delete [] buffer;
}
----------------------
-> No report AND it hangs!

[-2] is not detected on Linux x64;
[-3] is detected.

Reported by timurrrr@google.com on 2014-05-22 13:18:12

@ramosian-glider
Copy link
Member Author

Sorry, the repro was meant to have an access at [-1]

Reported by timurrrr@google.com on 2014-05-22 13:18:47

@ramosian-glider
Copy link
Member Author

Reported by konstantin.s.serebryany on 2014-05-22 13:51:59

@ramosian-glider
Copy link
Member Author

Most of the work is in the FE: http://llvm.org/bugs/show_bug.cgi?id=19838

Reported by konstantin.s.serebryany on 2014-05-23 12:59:38

@ramosian-glider
Copy link
Member Author

also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61293

Reported by konstantin.s.serebryany on 2014-05-23 13:08:38

@ramosian-glider
Copy link
Member Author

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

  • Labels added: ProjectAddressSanitizer

@ramosian-glider
Copy link
Member Author

Adding Project:AddressSanitizer as part of GitHub migration.

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

@kcc
Copy link
Contributor

kcc commented Dec 1, 2015

Tracked in http://llvm.org/bugs/show_bug.cgi?id=19838, nothing to do here.

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

2 participants