Last Comment Bug 651915 - Fix MarkStack size
: Fix MarkStack size
Status: RESOLVED FIXED
fixed-in-tracemonkey
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: ---
Assigned To: Gregor Wagner [:gwagner]
:
:
Mentors:
Depends on: 654590
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-21 10:57 PDT by Gregor Wagner [:gwagner]
Modified: 2011-05-03 15:48 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (1.25 KB, patch)
2011-04-21 11:11 PDT, Gregor Wagner [:gwagner]
wmccloskey: review+
Details | Diff | Splinter Review

Description Gregor Wagner [:gwagner] 2011-04-21 10:57:52 PDT
There is somewhere another division missing since "limit" is the entry count:

static const size_t OBJECT_MARK_STACK_SIZE = 32768 * sizeof(JSObject *);
static const size_t XML_MARK_STACK_SIZE = 1024 * sizeof(JSXML *);
static const size_t LARGE_MARK_STACK_SIZE = 64 * sizeof(LargeMarkItem);

  objStack = {
    stack = 0x11a2a61d8, 
    tos = 0, 
    limit = 262143
  }, 
  xmlStack = {
    stack = 0x11a4a61d8, 
    tos = 0, 
    limit = 8191
  }, 
  largeStack = {
    stack = 0x11a4b61d8, 
    tos = 0, 
    limit = 511
  }
Comment 1 Bill McCloskey (:billm) 2011-04-21 11:07:57 PDT
Oops. The problem is here:
    /* Pre-allocated space for the GC mark stacks. Pointer type ensures alignment. */
    void                *gcMarkStackObjs[js::OBJECT_MARK_STACK_SIZE];
    void                *gcMarkStackXMLs[js::XML_MARK_STACK_SIZE];
    void                *gcMarkStackLarges[js::LARGE_MARK_STACK_SIZE];
So the sizes are all four times bigger than I intended. I should have divided by sizeof(void*) or something.
Comment 2 Gregor Wagner [:gwagner] 2011-04-21 11:11:47 PDT
Created attachment 527589 [details] [diff] [review]
patch

Yeah that looks better.
Comment 3 Bill McCloskey (:billm) 2011-04-21 11:25:45 PDT
Comment on attachment 527589 [details] [diff] [review]
patch

Thanks.
Comment 4 Gregor Wagner [:gwagner] 2011-04-21 13:49:06 PDT
http://hg.mozilla.org/tracemonkey/rev/d148872ae9b2
Comment 5 Chris Leary [:cdleary] (not checking bugmail) 2011-04-26 15:13:51 PDT
http://hg.mozilla.org/mozilla-central/rev/d148872ae9b2

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