Last Comment Bug 725067 - IonMonkey: Crash [@ js::gc::ChunkBitmap::markIfUnmarked]
: IonMonkey: Crash [@ js::gc::ChunkBitmap::markIfUnmarked]
Status: RESOLVED FIXED
: crash, testcase
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Other Branch
: x86_64 Linux
: -- major (vote)
: ---
Assigned To: David Anderson [:dvander]
:
Mentors:
: 725073 (view as bug list)
Depends on:
Blocks: langfuzz IonFuzz
  Show dependency treegraph
 
Reported: 2012-02-07 13:17 PST by Christian Holler (:decoder)
Modified: 2013-01-14 08:02 PST (History)
5 users (show)
choller: in‑testsuite+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
part 1: split MGenericSetProperty up (17.31 KB, patch)
2012-02-08 13:46 PST, David Anderson [:dvander]
jdemooij: review+
Details | Diff | Splinter Review
part 2, rename LCacheSetProperty to LSetPropertyCache (7.72 KB, patch)
2012-02-08 13:50 PST, David Anderson [:dvander]
jdemooij: review+
Details | Diff | Splinter Review
part 3, fix the bug (3.88 KB, patch)
2012-02-08 14:25 PST, David Anderson [:dvander]
jdemooij: review+
Details | Diff | Splinter Review

Description Christian Holler (:decoder) 2012-02-07 13:17:02 PST
The following testcase crashes on ionmonkey revision d66c148e0756 (run with --ion -n), tested on 64 bit:


var o0 = [];
var o4 = {};
var o5 = Math;
function f6(o) { o[("Keywords")] = o;};
for(var i=0; i<20; i++) {
    f6(o0);
    f6(o4);
    f6(o5);
}
gc();
Comment 1 David Anderson [:dvander] 2012-02-08 13:43:29 PST
The bug here is that lhs == rhs in the register allocator, and then we generate code like:

   push lhs
   mov [lhs.slots], lhs
   mov rhs, [lhs]
   pop lhs

So we just need to get an extra register. But before that I'd like to refactor the SetProperty stuff so it looks more like GetProperty/GetElement.
Comment 2 David Anderson [:dvander] 2012-02-08 13:46:55 PST
Created attachment 595519 [details] [diff] [review]
part 1: split MGenericSetProperty up

This patch splits MGenericSetProperty into MCallSetProperty and MSetPropertyCache. LCallSetPropertyV/T are then combined into one unspecialized LCallSetProperty.
Comment 3 David Anderson [:dvander] 2012-02-08 13:50:55 PST
Created attachment 595521 [details] [diff] [review]
part 2, rename LCacheSetProperty to LSetPropertyCache
Comment 4 David Anderson [:dvander] 2012-02-08 14:25:01 PST
Created attachment 595537 [details] [diff] [review]
part 3, fix the bug
Comment 5 David Anderson [:dvander] 2012-02-08 14:40:26 PST
*** Bug 725073 has been marked as a duplicate of this bug. ***
Comment 6 Jan de Mooij [:jandem] 2012-02-09 00:39:23 PST
Comment on attachment 595519 [details] [diff] [review]
part 1: split MGenericSetProperty up

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

::: js/src/ion/MIR.h
@@ +2959,5 @@
>      bool strict_;
> +
> +  protected:
> +    MSetPropertyInstruction(MDefinition *obj, MDefinition *value, JSAtom *atom,
> +                        bool strict)

Nit: this needs some extra spaces
Comment 7 Jan de Mooij [:jandem] 2012-02-09 00:51:26 PST
Comment on attachment 595521 [details] [diff] [review]
part 2, rename LCacheSetProperty to LSetPropertyCache

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

What about renaming GetPropertyCache so these instructions use either a Call* or a Cache* prefix?
Comment 8 David Anderson [:dvander] 2012-02-09 12:05:53 PST
http://hg.mozilla.org/projects/ionmonkey/rev/9cd94217ee4f
http://hg.mozilla.org/projects/ionmonkey/rev/d546f1b141b9
http://hg.mozilla.org/projects/ionmonkey/rev/28c66941856b

I think I prefer Call/Cache as suffixes, but it's not a strong preference.
Comment 9 Christian Holler (:decoder) 2013-01-14 08:02:15 PST
A testcase for this bug was automatically identified at js/src/jit-test/tests/ion/bug725067.js.

Note You need to log in before you can comment on or make changes to this bug.