Open Bug 1730899 Opened 1 year ago Updated 10 months ago

GDB unwinder can't extract JSContext* from ThreadLocalStorage

Categories

(Core :: JavaScript Engine, defect, P3)

defect

Tracking

()

UNCONFIRMED

People

(Reporter: vincentkm, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

107 bytes, text/javascript
Details
Attached file t1.js

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36

Steps to reproduce:

While debugging the JS shell, started with the attached script given as input, and after enabling the unwinder (through 'enable unwinder .* SpiderMonkey' command), the unwinder clearly can't extract the JSContext* from js::TlsContext.

Steps:

  1. gdb --args path/to/js path/to/t1.js
  2. (gdb) b BaselineJIT.cpp:143
  3. (gdb) enable unwinder .* SpiderMonkey
  4. (gdb) r
    #After hitting breakpoint
  5. (gdb) b *data.jitcode #Breakpoint on BaselineInterpreter's loop address
  6. (gdb) c

Actual results:

Each step on JITed code prints the following error:

Python Exception <class 'gdb.error'> There is no member or method named mValue.:

When typing 'bt' command, no information about jit frames get printed.

Expected results:

'bt' command should print correct FrameType information.

Building and debugging happened on a virtualized host running Ubuntu 20.04 LTS.

(In reply to vincentvega from comment #1)

Building and debugging happened on a virtualized host running Ubuntu 20.04 LTS.

mozconfig:
ac_add_options --disable-shared-js
ac_add_options --enable-application=js
ac_add_options --disable-optimize
ac_add_options --enable-debug
ac_add_options --enable-fuzzing
ac_add_options --enable-js-fuzzilli
mk_add_options MOZ_MAKE_FLAGS="-s -j4"

Changing severity to NA because this is a debugging only issue.

It would be lovely if we could get this fixed, but the expertise is thin on the ground right now, and we're unlikely to tackle this eagerly.

Severity: -- → N/A
Priority: -- → P3
No longer blocks: sm-meta
Severity: N/A → S4
You need to log in before you can comment on or make changes to this bug.