ramosian-glider / memory-sanitizer

Automatically exported from code.google.com/p/memory-sanitizer
0 stars 0 forks source link

Find a better name for origin coming from free() #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
calling it "heap allocation" confuses users

Original issue reported on code.google.com by euge...@google.com on 28 Oct 2013 at 10:57

GoogleCodeExporter commented 9 years ago
1. Find space in StackDepot for an "origin type" flag: allocation / 
deallocation / a bunch of custom types (like __msan_poison).
2. Change the origin description in the report to "heap deallocation"
3. Maybe change the report header to MemorySanitizer: use-after-free

Original comment by euge...@google.com on 9 Dec 2014 at 8:32

GoogleCodeExporter commented 9 years ago
This is coming up over and over again.

I understand we are stuck at #1, is this a problem? Maybe instead we could 
check the top PC agains the ranges occupied by __interceptor_free etc?

Original comment by earth...@chromium.org on 21 Jan 2015 at 7:13

GoogleCodeExporter commented 9 years ago
One possible cheap way to solve this: when we record the deallocation stack 
trace on free(), delete, realloc, etc record the top frame somewhere. 
It will always be one of very few, i.e. we can use a fixed size array. 
Then, when reporting a bug, see if the first frame of the origin stack trace is 
one 
of the deallocation frames. 

Original comment by konstant...@gmail.com on 22 Jan 2015 at 1:05

GoogleCodeExporter commented 9 years ago
Sounds hackish.
There is plenty of space in the stackdepot for "stack type". We use an entire 
uptr for the number of frames in the stack trace!

Original comment by euge...@google.com on 22 Jan 2015 at 11:27

GoogleCodeExporter commented 9 years ago
Also note that realloc() should generate 2 distinct origins, as it both 
allocates and deallocated memory.

Original comment by euge...@google.com on 22 Jan 2015 at 12:01

GoogleCodeExporter commented 9 years ago
Fixed in http://llvm.org/viewvc/llvm-project?view=revision&revision=226821

Original comment by euge...@google.com on 22 Jan 2015 at 1:35

GoogleCodeExporter commented 9 years ago
Adding Project:MemorySanitizer as part of GitHub migration.

Original comment by gli...@google.com on 30 Jul 2015 at 9:22