All users were logged out of Bugzilla on October 13th, 2018
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)
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+
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla21
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.