All users were logged out of Bugzilla on October 13th, 2018

JS GDB support: regression tests' breakpoint function unified with other empty functions

RESOLVED FIXED in mozilla21

Status

()

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jimb, Unassigned)

Tracking

Trunk
mozilla21
x86_64
Linux
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
Created attachment 712662 [details] [diff] [review]
Keep js/src/gdb/gdb-tests.cpp's 'breakpoint' function from being unified with other functions in SM.

The file js/src/gdb/gdb-tests.cpp, the driver for the C++ side of the SpiderMonkey GDB support regression tests, includes an empty function named 'breakpoint', which specific test functions call once they have set up state for the Python side of the test to inspect. The regression tests set a breakpoint on 'breakpoint', and then select the calling frame to see the test's prepared state.

When SpiderMonkey is compiled without --enable-debug, without optimization, 'breakpoint' gets unified with many other empty functions from the SpiderMonkey library, such that the tests' breakpoint triggers when any of SM's other empty functions get hit. For example, js/src/ion/IonSpewer.h defines js::ion::CheckLogging to be an empty function if DEBUG is not #defined; that gets unified with js/src/gdb/gdb-tests.cpp's 'breakpoint', and then the JS GDB regression tests find their breakpoint being hit when they don't expect it.

The attached patch adds code that performs a distinctive side effect to 'breakpoint', so that the linker won't unify it with anything else. With this patch, all JS GDB support regression tests pass when SM is built without --enable-debug and without optimization.
Attachment #712662 - Flags: review?(sphink)
(Reporter)

Comment 1

6 years ago
Sorry, correction. With this patch, there is still one failure: test-jsid.py. That'll be a different bug.
Attachment #712662 - Flags: review?(sphink) → review+
(Reporter)

Comment 2

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/4ed4f90669b5
Status: NEW → ASSIGNED
Flags: in-testsuite+
Target Milestone: --- → mozilla21
https://hg.mozilla.org/mozilla-central/rev/4ed4f90669b5
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.