Closed
Bug 1093174
Opened 10 years ago
Closed 10 years ago
logalloc doesn't properly record allocation sizes for calloc calls
Categories
(Core :: Memory Allocator, defect)
Core
Memory Allocator
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: ggp, Assigned: ggp)
References
Details
Attachments
(1 file)
826 bytes,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
For a call like |calloc(x, y)|, the corresponding MemSlot's mSize field should be set to x * y. It is currently being set to just y.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8516052 -
Flags: review?(mh+mozilla)
Comment 2•10 years ago
|
||
Comment on attachment 8516052 [details] [diff] [review]
Properly compute the total size for calloc() calls.
Review of attachment 8516052 [details] [diff] [review]:
-----------------------------------------------------------------
::: memory/replace/logalloc/replay/Replay.cpp
@@ +393,5 @@
> mOps++;
> size_t num = parseNumber(aArgs.SplitChar(','));
> size_t size = parseNumber(aArgs);
> aSlot.mPtr = ::calloc_impl(num, size);
> + aSlot.mSize = size * num;
duh
Attachment #8516052 -
Flags: review?(mh+mozilla) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Assignee: nobody → ggoncalves
Keywords: checkin-needed
Comment 4•10 years ago
|
||
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in
before you can comment on or make changes to this bug.
Description
•