Closed Bug 1749940 Opened 2 years ago Closed 2 years ago

Underspecified baseline register management in exn handling

Categories

(Core :: JavaScript: WebAssembly, defect, P2)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: lth, Assigned: rhunt)

References

(Blocks 1 open bug)

Details

In BaseCompiler::endTryCatch:

  // Prevent conflict with exn register when popping this result.
  RegI32 temp = popI32();
  RegI32 index = needI32();
  moveI32(temp, index);
  freeI32(temp);

I think this needs a better comment and ideally some kind of assertion. There's an assumption here about the identities of temp and index; this should be checked. (Elsewhere in the code when this kind of structure is needed we reserve the explicit register that is conflicting but I understand we can't do that here because of the call. We just need to be more deliberate about how we control the register identities. The code is likely correct, for now.)

Fixed as part of bug 1755053.

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.