Closed Bug 1350762 Opened 7 years ago Closed 7 years ago

weakMap should be rooted in testGCGrayMarking.cpp

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(1 file)

this bug is reproducible after applying patches in bug 1331092, but not related to the bug.

>     JSObject* weakMap = JS::NewWeakMapObject(cx);
>     CHECK(weakMap);
> 
>     JSObject* key = AllocWeakmapKeyObject();
>     CHECK(key);

weakMap may point old object after AllocWeakmapKeyObject.
to keep the current structure as much as possible, added root to weakMap while calling AllocWeakmapKeyObject and AllocPlainObject, in extra block.

(looks like the test want unrooted weakMap after that)
Attachment #8851435 - Flags: review?(sphink)
Comment on attachment 8851435 [details] [diff] [review]
Root weakMap while calling AllocWeakmapKeyObject and AllocPlainObject in testGCGrayMarking.cpp.

Review of attachment 8851435 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for fixing this.

I don't see how the patches in bug 1350844 could have triggered this though.
Attachment #8851435 - Flags: review?(sphink) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/330d7f574b0c2eb18699a4d727cabe88694572fb
Bug 1350762 - Root weakMap while calling AllocWeakmapKeyObject and AllocPlainObject in testGCGrayMarking.cpp. r=jonco
Backed out bug 1331092 and bug 1350762 for breaking js plain shell tests on Windows:

bug 1350762:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a8e4bb0a73edb848bb93af8ca63a3b6c7d85cc42

bug 1331092:
https://hg.mozilla.org/integration/mozilla-inbound/rev/32f2480cd5aeed2a5d44fe918418d66b9f897b60
https://hg.mozilla.org/integration/mozilla-inbound/rev/f7ac3610d777849e9d5cd8c71295bc17253f6dfe
https://hg.mozilla.org/integration/mozilla-inbound/rev/14c3c0f2b7183d31cfe13f4edb2ef8f1eb0cbad6
https://hg.mozilla.org/integration/mozilla-inbound/rev/b7ba8b772e65a74441edf8d88a67c0873aa76aa3
https://hg.mozilla.org/integration/mozilla-inbound/rev/c0484f2722f37109453196112b0b1bfe5560e11c
https://hg.mozilla.org/integration/mozilla-inbound/rev/1d00d1e5a0f6a8ad28921c562e0fd52b9c4555e0
https://hg.mozilla.org/integration/mozilla-inbound/rev/f9e4c5ed3ed5fea355d42a6767d4eb686ce171a5
https://hg.mozilla.org/integration/mozilla-inbound/rev/649797f1174f3e03b3b04feb54cf0cb2a660047b
https://hg.mozilla.org/integration/mozilla-inbound/rev/1977f337bc2db8db43c00d42d22b0636dc0eb66f
https://hg.mozilla.org/integration/mozilla-inbound/rev/97e7ac639161dc6dc30ae89646c34d156e2ae36e

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=9b0c51ce33e8a5bfd25e06cca7d70164893b5113&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=86668970&repo=mozilla-inbound

c:/builds/moz2_slave/m-in_w32_sm-plain-000000000000/src/obj-spider/_virtualenv/Scripts/python.exe -m mozbuild.action.cl  c:/builds/moz2_slave/m-in_w32_sm-plain-000000000000/vs2015u3/VC/bin/amd64_x86/cl.exe -FoUnified_cpp_js_src4.obj -c   -DNDEBUG=1 -DTRIMMED=1 -D_CRT_RAND_S -DENABLE_BINARYDATA -DENABLE_SIMD -DENABLE_SHARED_ARRAY_BUFFER -DEXPORT_JS_API -DMOZ_HAS_MOZGLUE -Ic:/builds/moz2_slave/m-in_w32_sm-plain-000000000000/src/js/src -Ic:/builds/moz2_slave/m-in_w32_sm-plain-000000000000/src/obj-spider/js/src  -Ic:/builds/moz2_slave/m-in_w32_sm-plain-000000000000/src/obj-spider/dist/include  -Ic:/builds/moz2_slave/m-in_w32_sm-plain-000000000000/src/obj-spider/dist/include/nspr         -MD -FI c:/builds/moz2_slave/m-in_w32_sm-plain-000000000000/src/obj-spider/js/src/js-confdefs.h -DMOZILLA_CLIENT   -arch:SSE2 -TP -nologo -utf-8 -wd4800 -wd4595 -D_CRT_SECURE_NO_WARNINGS -wd5026 -wd5027 -Zc:sizedDealloc- -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -Gw -wd4244 -wd4267 -wd4251 -we4553 -GR-  -Zi -O2 -Oy- -WX -wd4805 -wd4661 -we4067 -we4258 -we4275 -wd4146 -wd4577 -wd4312 -Fdgenerated.pdb -FS  c:/builds/moz2_slave/m-in_w32_sm-plain-000000000000/src/obj-spider/js/src/Unified_cpp_js_src4.cpp
Unified_cpp_js_src37.cpp
c:\builds\moz2_slave\m-in_w32_sm-plain-000000000000\src\obj-spider\dist\include\mozilla/BufferList.h(352): error C2589: '(': illegal token on right side of '::'
c:\builds\moz2_slave\m-in_w32_sm-plain-000000000000\src\obj-spider\dist\include\mozilla/BufferList.h(342): note: while compiling class template member function 'bool mozilla::BufferList<js::SystemAllocPolicy>::WriteBytes(const char *,std::size_t)'
c:\builds\moz2_slave\m-in_w32_sm-plain-000000000000\src\obj-spider\dist\include\js/StructuredClone.h(193): note: see reference to class template instantiation 'mozilla::BufferList<js::SystemAllocPolicy>' being compiled
c:\builds\moz2_slave\m-in_w32_sm-plain-000000000000\src\obj-spider\dist\include\mozilla/BufferList.h(352): error C2059: syntax error: '::'
c:\builds\moz2_slave\m-in_w32_sm-plain-000000000000\src\obj-spider\dist\include\mozilla/BufferList.h(362): error C2589: '(': illegal token on right side of '::'
c:\builds\moz2_slave\m-in_w32_sm-plain-000000000000\src\obj-spider\dist\include\mozilla/BufferList.h(362): error C2059: syntax error: '::'
c:\builds\moz2_slave\m-in_w32_sm-plain-000000000000\src\obj-spider\dist\include\mozilla/BufferList.h(384): error C2589: '(': illegal token on right side of '::'
c:\builds\moz2_slave\m-in_w32_sm-plain-000000000000\src\obj-spider\dist\include\mozilla/BufferList.h(380): note: while compiling class template member function 'bool mozilla::BufferList<js::SystemAllocPolicy>::ReadBytes(mozilla::BufferList<js::SystemAllocPolicy>::IterImpl &,char *,std::size_t) const'
c:\builds\moz2_slave\m-in_w32_sm-plain-000000000000\src\obj-spider\dist\include\mozilla/BufferList.h(384): error C2059: syntax error: '::'
c:\builds\moz2_slave\m-in_w32_sm-plain-000000000000\src\obj-spider\dist\include\mozilla/BufferList.h(459): error C2589: '(': illegal token on right side of '::'
c:\builds\moz2_slave\m-in_w32_sm-plain-000000000000\src\obj-spider\dist\include\mozilla/BufferList.h(451): note: while compiling class template member function 'mozilla::BufferList<js::SystemAllocPolicy> mozilla::BufferList<js::SystemAllocPolicy>::Extract(mozilla::BufferList<js::SystemAllocPolicy>::IterImpl &,std::size_t,bool *)'
c:\builds\moz2_slave\m-in_w32_sm-plain-000000000000\src\obj-spider\dist\include\mozilla/BufferList.h(459): error C2059: syntax error: '::'
c:/builds/moz2_slave/m-in_w32_sm-plain-000000000000/src/config/rules.mk:1011: recipe for target 'Unified_cpp_js_src37.obj' failed
mozmake[3]: *** [Unified_cpp_js_src37.obj] Error 2
mozmake[3]: *** Waiting for unfinished jobs....
Flags: needinfo?(arai.unmht)
I'll fix in bug 1331092 as Part 0
Flags: needinfo?(arai.unmht)
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/be699da69269
Root weakMap while calling AllocWeakmapKeyObject and AllocPlainObject in testGCGrayMarking.cpp. r=jonco
https://hg.mozilla.org/mozilla-central/rev/be699da69269
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: