Open Bug 1829128 Opened 1 years ago Updated 1 year ago

jemalloc could tell the crash reporter which memory its freeing

Categories

(Core :: Memory Allocator, task)

task

Tracking

()

ASSIGNED

People

(Reporter: pbone, Assigned: pbone, NeedInfo)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

If jemalloc tries to free an invalid pointer but one that is NOT a PHC pointer the address calculations performed by jemalloc could cause jemalloc to dereference a PHC pointer, adding PHC stacks to a crash report that could be a red herring.

Before freeing a pointer jemalloc could record in thread local storage the pointer it's about to free, then clear it when done. Then if a crash occurs the crash reporter could ask jemalloc if it was freeing a pointer, if it says "yes this one" then that's the one we want to look up, not the crash address.

There will be trade-offs, but I haven't thought very much about them yet, so this may not be a great idea, it's "to consider".

Assignee: nobody → pbone
Status: NEW → ASSIGNED
Summary: jemalloc could tell PHC which memory its freeing → jemalloc could tell the crash reporter which memory its freeing

Depends on D180195

Attachment #9337842 - Attachment description: WIP: Bug 1829128 - Don't use PHC for crashes in jemalloc → Bug 1829128 - Crashes in jemalloc don't have useful PHC stacks r=gsvelto
Pushed by pbone@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c93bc35c5289 Improve some code style r=gsvelto https://hg.mozilla.org/integration/autoland/rev/301d3e2bdac3 Crashes in jemalloc don't have useful PHC stacks r=gsvelto

There are some r+ patches which didn't land and no activity in this bug for 2 weeks.
:pbone, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(pbone)
Flags: needinfo?(gsvelto)
Flags: needinfo?(gsvelto)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: