Closed Bug 651915 Opened 13 years ago Closed 13 years ago

Fix MarkStack size

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: gwagner, Assigned: gwagner)

References

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

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
  }
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.
Attached patch patchSplinter Review
Yeah that looks better.
Assignee: general → anygregor
Attachment #527589 - Flags: review?(wmccloskey)
Comment on attachment 527589 [details] [diff] [review]
patch

Thanks.
Attachment #527589 - Flags: review?(wmccloskey) → review+
http://hg.mozilla.org/tracemonkey/rev/d148872ae9b2
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/d148872ae9b2
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Depends on: 654590
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: