Closed Bug 887645 Opened 12 years ago Closed 12 years ago

Compilation Failed With js/src/jsinterp.cpp:3684:9: error: indirect goto might cross protected scopes

Categories

(Core :: JavaScript Engine, defect)

17 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: david, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36 Steps to reproduce: Download SpiderMonkey 17. Unpack. cd js/src ./configure make Actual results: The following compilation error: /usr/local/bin/clang++ -o jsinterp.o -c -fvisibility=hidden -DENABLE_YARR_JIT=1 -DIMPL_MFBT -DEXPORT_JS_API -DNO_NSPR_10_SUPPORT -DUSE_ZLIB -I./../../mfbt/double-conversion -I. -I. -I./dist/include -I. -I./assembler -I./yarr -fPIC -Qunused-arguments -Qunused-arguments -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wno-c++0x-extensions -Wno-extended-offsetof -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-mismatched-tags -fno-common -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -pthread -pipe -DNDEBUG -DTRIMMED -g -O3 -fno-stack-protector -fomit-frame-pointer -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1 -Qunused-arguments -DMOZILLA_CLIENT -include ./js-confdefs.h -MD -MF .deps/jsinterp.o.pp /Users/dew/mozjs17.0.0/js/src/jsinterp.cpp /Users/dew/mozjs17.0.0/js/src/jsinterp.cpp:3684:9: error: indirect goto might cross protected scopes DO_NEXT_OP(len); ^ /Users/dew/mozjs17.0.0/js/src/jsinterp.cpp:1091:33: note: expanded from macro 'DO_NEXT_OP' DO_OP(); \ ^ /Users/dew/mozjs17.0.0/js/src/jsinterp.cpp:1085:47: note: expanded from macro 'DO_OP' JS_EXTENSION_(goto *jumpTable[op]); \ ^ ./jstypes.h:279:44: note: expanded from macro 'JS_EXTENSION_' # define JS_EXTENSION_(s) __extension__ ({ s; }) ^ /Users/dew/mozjs17.0.0/js/src/jsinterp.cpp:1420:1: note: possible target of indirect goto ADD_EMPTY_CASE(JSOP_NOP) ^ /Users/dew/mozjs17.0.0/js/src/jsinterp.cpp:1097:29: note: expanded from macro 'ADD_EMPTY_CASE' # define ADD_EMPTY_CASE(OP) BEGIN_CASE(OP) \ ^ /Users/dew/mozjs17.0.0/js/src/jsinterp.cpp:1094:29: note: expanded from macro 'BEGIN_CASE' # define BEGIN_CASE(OP) L_##OP: ^ <scratch space>:118:1: note: expanded from here L_JSOP_NOP ^ /Users/dew/mozjs17.0.0/js/src/jsinterp.cpp:3667:25: note: jump exits scope of variable with non-trivial destructor DebugOnly<uint32_t> blockDepth = regs.fp()->blockChain().stackDepth(); ^ 1 error generated. make[1]: *** [jsinterp.o] Error 1 make: *** [default] Error 2 Expected results: Compilation should have succeeded. This is unmodified SpiderMonkey 17, on OS X 10.8.4 with trunk clang 3.4. /usr/local/bin/clang++ --version clang version 3.4 (trunk 184528) Target: x86_64-apple-darwin12.4.0 Thread model: posix
I'm pretty sure you can enclose that DebugOnly line in #ifdef DEBUG / ... / #endif to fix this. Given when we were working on 17's code, it's likely that clang wasn't quite on people's radar yet (it is now, and I remember this issue being fixed at some point), so nobody noticed clang was broken. At this point, for an issue that's very simply patched, I don't think we'd spin a "17.0.1" point-release to fix it. So I suggest making the easy fix locally, and wait for the 24 release for things to just work without changes.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
No problem, good to know this is a known issue and resolved in 24. Perhaps consider putting this in the FAQ / Known Issues section?
<https://developer.mozilla.org/en-US/docs/SpiderMonkey/17> is a wiki, so feel free to edit. :-) The whole thing is very much skeletal, tho, because we'd gotten somewhat out of the habit of doing release-notes-y things, and it seemed better to do a release with bad docs than no release with "good" docs. So adding it there or not probably won't make much difference. We're trying to do a little better with 24 notes at <https://developer.mozilla.org/en-US/docs/SpiderMonkey/24>, but we started focusing on documenting substantial API changes as they happen a bit into the cycle, so even that won't be the greatest. But you gotta start somewhere. :-) 31 is hopefully when we'll really start to get things right, as we note changes incrementally as we go.
You need to log in before you can comment on or make changes to this bug.