Closed
Bug 1112968
Opened 9 years ago
Closed 9 years ago
dmd.py: Add Mac- and Windows-specific functions to the --alloc-fns list
Categories
(Core :: DMD, defect)
Core
DMD
Tracking
()
RESOLVED
FIXED
mozilla37
People
(Reporter: n.nethercote, Assigned: n.nethercote)
Details
Attachments
(2 files, 1 obsolete file)
2.16 KB,
patch
|
mccr8
:
review+
|
Details | Diff | Splinter Review |
1.24 KB,
patch
|
mccr8
:
review+
|
Details | Diff | Splinter Review |
Now that DMD works on Mac non-debug builds, I've found that it's not ignoring some allocation functions that it should.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8538218 -
Flags: review?(continuation)
Comment 2•9 years ago
|
||
Comment on attachment 8538218 [details] [diff] [review] dmd.py: Add Mac-specific functions to the --alloc-fns list Review of attachment 8538218 [details] [diff] [review]: ----------------------------------------------------------------- ::: memory/replace/dmd/dmd.py @@ +26,5 @@ > # match these strings will be removed from the *start* of stack traces. (Once > # we hit a non-matching frame, any subsequent frames won't be removed even if > # they do match.) > allocatorFns = [ > + 'malloc', Doesn't including malloc/calloc/etc here make the various replace_malloc etc. various redundant? Because we do a search? That seems okayish to me, but you're going to match a bunch of new stuff.
Attachment #8538218 -
Flags: review?(continuation) → review+
Assignee | ||
Comment 3•9 years ago
|
||
Good point. So let's simplify the list. I'm happy to take the risk of over-matching -- the likelihood of a non-allocation function containing the substring malloc/calloc/realloc/memalign is low enough for my liking.
Attachment #8538243 -
Flags: review?(continuation)
Updated•9 years ago
|
Attachment #8538243 -
Flags: review?(continuation) → review+
Assignee | ||
Comment 4•9 years ago
|
||
Comment on attachment 8538218 [details] [diff] [review] dmd.py: Add Mac-specific functions to the --alloc-fns list Thank you for the fast reviews.
Attachment #8538218 -
Attachment is obsolete: true
Assignee | ||
Comment 5•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/755f504063f0
Assignee | ||
Comment 6•9 years ago
|
||
Another one, this time for Windows.
Attachment #8538934 -
Flags: review?(continuation)
Comment 7•9 years ago
|
||
Comment on attachment 8538934 [details] [diff] [review] dmd.py: Tweak the --alloc-fns list for better effect on Windows Review of attachment 8538934 [details] [diff] [review]: ----------------------------------------------------------------- ::: memory/replace/dmd/dmd.py @@ +36,5 @@ > # Matches memalign, posix_memalign, replace_memalign, replace_posix_memalign, moz_xmemalign, moz_xposix_memalign, vpx_memalign, malloc_zone_memalign. > 'memalign', > 'operator new(', > 'operator new[](', > + 'NS_Alloc', Maybe add NS_Realloc and NS_Free while you are here? Those are the only other alloc-y functions I see in nsXPCOM.h.
Attachment #8538934 -
Flags: review?(continuation) → review+
Assignee | ||
Comment 8•9 years ago
|
||
I'll add NS_Realloc. I'll leave the understanding of NS_Free's omission as an exercise for the reader :)
Comment 9•9 years ago
|
||
Oops, right. But hey we could start recording stacks for deallocation in the future! And I guess rename the variable.
Assignee | ||
Comment 10•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/2c91a808c506
Summary: dmd.py: Add Mac-specific functions to the --alloc-fns list → dmd.py: Add Mac- and Windows-specific functions to the --alloc-fns list
Comment 11•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/755f504063f0 https://hg.mozilla.org/mozilla-central/rev/2c91a808c506
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in
before you can comment on or make changes to this bug.
Description
•