Closed Bug 1904992 Opened 1 year ago Closed 1 year ago

Handle JSOp::AddDisposable in the stack dump in disassemble

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: arai, Assigned: debadree333)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The following code dumps the disassemble, with stack state

dis();
{
  using x = {};
}

There, AddDisposable converts the OBJ value pushed by NewObject to <unknown>.

00015:   2  TryUsing                    #
00016:   3  NewObject {}                # OBJ
00021:   3  AddDisposable               # <unknown>
00022:   3  InitAliasedLexical "x" (hops = 0, slot = 3) # <unknown>
00027:   3  Pop                         #

it's because AddDisposable pops 1 value and pushes 1 value, as defined below,

https://searchfox.org/mozilla-central/rev/56dd89bcf4d3b85f66621e89eac6e2936ad382d9/js/src/vm/Opcodes.h#3412-3414

 *   Stack: v => v
 */ \
IF_EXPLICIT_RESOURCE_MANAGEMENT(MACRO(AddDisposable, add_disposable, NULL, 1, 1, 1, JOF_BYTE)) \

but it's not handled by stack dump, which results in using "<unknown>".

https://searchfox.org/mozilla-central/rev/56dd89bcf4d3b85f66621e89eac6e2936ad382d9/js/src/vm/BytecodeUtil.cpp#1963-1965,2144-2147

switch (op) {
  case JSOp::Arguments:
    return write("arguments");
...
  default:
    break;
}
return write("<unknown>");
Assignee: nobody → debadree333
Status: NEW → ASSIGNED
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/e377861c75fb Handle JSOp::AddDisposable in the stack dump in disassemble. r=arai
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: