Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: gwagner, Assigned: gwagner)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
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.
(Assignee)

Comment 2

6 years ago
Created attachment 527589 [details] [diff] [review]
patch

Yeah that looks better.
Assignee: general → anygregor
(Assignee)

Updated

6 years ago
Attachment #527589 - Flags: review?(wmccloskey)
Comment on attachment 527589 [details] [diff] [review]
patch

Thanks.
Attachment #527589 - Flags: review?(wmccloskey) → review+
(Assignee)

Comment 4

6 years ago
http://hg.mozilla.org/tracemonkey/rev/d148872ae9b2
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/d148872ae9b2
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED

Updated

6 years ago
Depends on: 654590
You need to log in before you can comment on or make changes to this bug.