Closed Bug 1804011 Opened 1 year ago Closed 1 year ago

Avoid possible assertion failures in FunctionCompiler::emitInstanceCall

Categories

(Core :: JavaScript: WebAssembly, defect)

defect

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: jseward, Assigned: jseward)

Details

Attachments

(1 file)

Bug 1799856 D163112 added a helper method FunctionCompiler::emitInstanceCall.
Although this is believed always to generate correct MIR, the assertions
relating to number-of-arguments have been observed to fail in the case where
we're currently in dead code. In that case some of the actual arguments
(MDefinition*s) can be null, which causes the actual args to be
under-counted.

Given that ::passInstance, ::passArg, ::finishCall and
::builtinInstanceMethodCall are all no-ops in dead code, this routine
generates no MIR in dead code, so a simple fix is to add a dead-code check to
this routine too.

Bug 1799856 D163112 added a helper method FunctionCompiler::emitInstanceCall.
Although this is believed always to generate correct MIR, the assertions
relating to number-of-arguments have been observed to fail in the case where
we're currently in dead code. In that case some of the actual arguments
(MDefinition*s) can be null, which causes the actual args to be
under-counted.

Given that ::passInstance, ::passArg, ::finishCall and
::builtinInstanceMethodCall are all no-ops in dead code, this routine
generates no MIR in dead code, so a simple fix is to add a dead-code check to
this routine too.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: