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)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: ggp, Assigned: ggp)

References

Details

Attachments

(1 file)

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.
Attachment #8516052 - Flags: review?(mh+mozilla)
Blocks: 762448
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+
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.

Attachment

General

Created:
Updated:
Size: