Closed Bug 1500822 Opened 11 months ago Closed 11 months ago

TryNote::start should be relative to code() instead of main()

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

Details

Attachments

(2 files)

Code currently accessing try notes ends up using variables called |pcOffset| and unlikely everywhere else in the engine (which is relative to code()), this means relative to main(). It is time to end this prank we have been playing on ourselves.
Currently it is relative to JSScript::main(), but it is the only part of
the engine that uses this definition to describe a "pcOffset". This is
unnecessarily confusing, and fixing it is easy.
This should symptomless since the extra op should always be a JSOP_GOTO
which will be skipped over anyways. Fix for our sanity.
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2eda4a5dffcc
Make TryNote::start relative to JSScript::code() r=jorendorff
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cb7ced1eb7ed
Fix a try-note range check in the debugger r=jorendorff
Backed out 2 changesets (bug 1500822) for build bustage. CLOSED TREE

Log:
https://treeherder.mozilla.org/logviewer.html#?job_id=207084890&repo=autoland

 INFO -  netwerk/protocol/ftp
[task 2018-10-22T20:41:18.262Z] 20:41:18     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/netwerk/protocol/ftp'
[task 2018-10-22T20:41:18.262Z] 20:41:18     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/netwerk/protocol/ftp'
[task 2018-10-22T20:41:18.262Z] 20:41:18     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/netwerk/protocol/ftp'
[task 2018-10-22T20:41:18.306Z] 20:41:18     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/js/src'
[task 2018-10-22T20:41:18.307Z] 20:41:18     INFO -  /builds/worker/workspace/build/src/sccache2/sccache /builds/worker/workspace/build/src/clang/bin/clang++ -o Unified_cpp_js_src32.o -c  -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DDEBUG=1 -DENABLE_BINARYDATA -DENABLE_WASM_BULKMEM_OPS -DENABLE_WASM_THREAD_OPS -DENABLE_WASM_GC -DWASM_PRIVATE_REFTYPES -DWASM_HUGE_MEMORY -DJS_CACHEIR_SPEW -DENABLE_SHARED_ARRAY_BUFFER -DJS_HAS_CTYPES -DFFI_BUILDING -DEXPORT_JS_API -DMOZ_HAS_MOZGLUE -I/builds/worker/workspace/build/src/js/src -I/builds/worker/workspace/build/src/obj-firefox/js/src -I/builds/worker/workspace/build/src/obj-firefox/js/src/ctypes/libffi/include -I/builds/worker/workspace/build/src/js/src/ctypes/libffi/src/x86 -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/js/src/js-confdefs.h -Qunused-arguments -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Qunused-arguments -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-noexcept-type -Wno-unknown-warning-option -Wno-return-type-c-linkage -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O3 -fno-omit-frame-pointer -funwind-tables -Werror -fno-strict-aliasing -Werror=format -Wno-shadow  -MD -MP -MF .deps/Unified_cpp_js_src32.o.pp   /builds/worker/workspace/build/src/obj-firefox/js/src/Unified_cpp_js_src32.cpp
[task 2018-10-22T20:41:18.308Z] 20:41:18     INFO -  In file included from /builds/worker/workspace/build/src/obj-firefox/js/src/Unified_cpp_js_src32.cpp:29:
[task 2018-10-22T20:41:18.308Z] 20:41:18     INFO -  /builds/worker/workspace/build/src/js/src/vm/BytecodeUtil.cpp:1456:22: error: unused variable 'mainOffset' [-Werror,-Wunused-variable]
[task 2018-10-22T20:41:18.308Z] 20:41:18     INFO -                size_t mainOffset = script->mainOffset();
[task 2018-10-22T20:41:18.309Z] 20:41:18     INFO -                       ^
[task 2018-10-22T20:41:18.310Z] 20:41:18     INFO -  1 error generated.
[task 2018-10-22T20:41:18.310Z] 20:41:18     INFO -  /builds/worker/workspace/build/src/config/rules.mk:1126: recipe for target 'Unified_cpp_js_src32.o' failed
[task 2018-10-22T20:41:18.311Z] 20:41:18     INFO -  make[4]: *** [Unified_cpp_js_src32.o] Error 1
[task 2018-10-22T20:41:18.311Z] 20:41:18     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/js/src'
[task 2018-10-22T20:41:18.311Z] 20:41:18     INFO -  /builds/worker/workspace/build/src/config/recurse.mk:74: recipe for target 'js/src/target' failed
[task 2018-10-22T20:41:18.312Z] 20:41:18     INFO -  make[3]: *** [js/src/target] Error 2
[task 2018-10-22T20:41:18.312Z] 20:41:18     INFO -  make[3]: *** Waiting for unfinished jobs....
[task 2018-10-22T20:41:18.312Z] 20:41:18     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/netwerk/base'
[task 2018-10-22T20:41:18.312Z] 20:41:18     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/netwerk/base'
[task 2018-10-22T20:41:18.328Z] 20:41:18     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/netwerk/base'
[task 2018-10-22T20:41:18.328Z] 20:41:18     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/netwerk/base'
[task 2018-10-22T20:41:18.410Z] 20:41:18     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/netwerk/cache'
[task 2018-10-22T20:41:18.410Z] 20:41:18     INFO -  /builds/worker/workspace/build/src/sccache2/sccache /builds/worker/workspace/build/src/clang/bin/clang++ -o Unified_cpp_netwerk_cache0.o -c  -I/builds/worker/workspace/build/src/obj-firefox/dist/stl_wrappers -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DDEBUG=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/worker/workspace/build/src/netwerk/cache -I/builds/worker/workspace/build/src/obj-firefox/netwerk/cache -I/builds/worker/workspace/build/src/netwerk/base -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Qunused-arguments -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Qunused-arguments -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -Os -fno-omit-frame-pointer -funwind-tables -Werror -Wno-error=shadow  -MD -MP -MF .deps/Unified_cpp_netwerk_cache0.o.pp   /builds/worker/workspace/build/src/obj-firefox/netwerk/cache/Unified_cpp_netwerk_cache0.cpp
[task 2018-10-22T20:41:18.410Z] 20:41:18     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/netwerk/cache'
[task 2018-10-22T20:41:18.410Z] 20:41:18     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/netwerk/base'
[task 2018-10-22T20:41:18.411Z] 20:41:18     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/netwerk/base'
[task 2018-10-22T20:41:18.411Z] 20:41:18     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/netwerk/base'
[task 2018-10-22T20:41:18.411Z] 20:41:18     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/netwerk/base'
[task 2018-10-22T20:41:18.411Z] 20:41:18     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/netwerk/cache2'
[task 2018-10-22T20:41:18.416Z] 20:41:18     INFO -  /builds/worker/workspace/build/src/sccache2/sccache /builds/worker/workspace/b

Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=501fffbf872d0a320069448010aa0706d3b81409&selectedJob=207084890

Backout:
https://hg.mozilla.org/integration/autoland/rev/bff46c89a68bebf27458b3f0aaa2715d6062c041
Flags: needinfo?(tcampbell)
Unused variable |mainOffset|. I've removed and will reland once my sanity check on try is done.
Flags: needinfo?(tcampbell)
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/38e27cc84adc
Make TryNote::start relative to JSScript::code() r=jorendorff
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/147e4ace74cc
Fix a try-note range check in the debugger r=jorendorff
https://hg.mozilla.org/mozilla-central/rev/38e27cc84adc
https://hg.mozilla.org/mozilla-central/rev/147e4ace74cc
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.