Otherwise, we end up with a situation like this: 1. We generate our IC which has a branch on a callee check. If the branch succeeds, we will call code for a particular CodeBlock. 2. Heap::deleteAllCodeBlocks is called. This leads the Executable to clear its various codeBlock references. 3. Wasm has no idea this happened, so now it has stale ICs that point into code from a CodeBlock no longer belonging to an Executable.
<rdar://problem/31891649>
Created attachment 309130 [details] patch
Attachment 309130 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/wasm/js/JSWebAssemblyCodeBlockSubspace.cpp:31: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/wasm/js/JSWebAssemblyCodeBlockSubspace.cpp:32: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/heap/Heap.cpp:51: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 3 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 309189 [details] patch
Attachment 309189 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/wasm/js/JSWebAssemblyCodeBlockSubspace.cpp:31: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/wasm/js/JSWebAssemblyCodeBlockSubspace.cpp:32: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/heap/Heap.cpp:51: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 3 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 309190 [details] patch fix include ordering
Comment on attachment 309190 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=309190&action=review Looks good! > Source/JavaScriptCore/runtime/VM.cpp:176 > + , webAssemblyCodeBlockSubspace("JSWebAssemblyCodeBlockSubspace", heap) I've been calling these "Spaces" and not "Subspaces". It's a subspace of the heap but it's the space of web assembly code blocks. But, I don't feel very strongly about this. For example, I would be in favor of renaming all of them to have the "Subspace" suffix (including the two in WebCore). I'm a bit less sure about having the naming be inconsistent.
Created attachment 309465 [details] patch for landing I made Fil's naming suggestion.
Comment on attachment 309465 [details] patch for landing Clearing flags on attachment: 309465 Committed r216481: <http://trac.webkit.org/changeset/216481>
All reviewed patches have been landed. Closing bug.
*** Bug 165639 has been marked as a duplicate of this bug. ***