Closed
Bug 1185168
Opened 10 years ago
Closed 3 months ago
js_free should poison memory before it frees it, where possible
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: Waldo, Unassigned)
Details
I have a hacked-up version of this locally that consists of adding
#ifdef DEBUG
size_t sz = malloc_usable_size(p);
VALGRIND_DISABLE_ADDR_ERROR_REPORTING_IN_RANGE(p, sz);
memset(p, 0x3D, sz);
VALGRIND_ENABLE_ADDR_ERROR_REPORTING_IN_RANGE(p, sz);
#endif
to the start of js_free, with
#include <malloc.h>
#include <valgrind/memcheck.h>
added to the start of the file. This is obviously not portable and would need cleanup along multiple axes to land. :-) But it would probably help expose some errors much more quickly.
Updated•3 years ago
|
Severity: normal → S3
Updated•3 months ago
|
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•