Closed Bug 1590034 Opened 3 months ago Closed 3 months ago

Use MOZ_CRASH_UNSAFE_PRINTF in AutoEnterOOMUnsafeRegion::crash

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This will make it easier to see where the crashes in bug 1584232 are coming from. It also simplifies the code.

Are the fuzzers okay with this:

Assertion failure: [unhandlable oom] Foo
Hit MOZ_CRASH() at js/src/vm/JSContext.cpp:1519

Changing to:

Hit MOZ_CRASH([unhandlable oom] Foo) at js/src/vm/JSContext.cpp:1516
Flags: needinfo?(nth10sd)
Flags: needinfo?(choller)
Assignee: nobody → jdemooij
Status: NEW → ASSIGNED

It's simpler and this way the |reason| string will be available on crash-stats.

Attachment #9102897 - Attachment description: Bug 1590034 - Use MOZ_CRASH_UNSAFE_PRINTF in AutoEnterOOMUnsafeRegion::crash. r?jonco! → Bug 1590034 - Use MOZ_CRASH_UNSAFE in AutoEnterOOMUnsafeRegion::crash. r?jonco!

MOZ_CRASH messages only print in debug builds, so this is going to be a problem.

We could make MOZ_CRASH print its message in debug or fuzzing builds, I wanted to make this change anyway. Now we have another reason to do so. I'll file a bug.

Flags: needinfo?(choller)

Oh I misread, you want to use MOZ_CRASH_UNSAFE_PRINTF. In that case, it should work. But would it be easier for you to use MOZ_CRASH instead if we want to make the print change anyway for fuzzing builds?

Flags: needinfo?(jdemooij)

(In reply to Christian Holler (:decoder) from comment #3)

MOZ_CRASH messages only print in debug builds, so this is going to be a problem.

Yeah, I just fixed that in the patch, because we also need this printing in opt builds for the jit-test harness and those shell builds are not all fuzzing builds...

Flags: needinfo?(jdemooij)
Flags: needinfo?(nth10sd)
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bb2c1e0f98d0
Use MOZ_CRASH_UNSAFE in AutoEnterOOMUnsafeRegion::crash. r=jonco
Priority: -- → P1
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.