Bug 26843 - Fix run-time crashes in JavaScriptCore on Symbian with Metrowerks compiler
: Fix run-time crashes in JavaScriptCore on Symbian with Metrowerks compiler
Status: RESOLVED FIXED
: WebKit
Platform
: 528+ (Nightly build)
: PC Mac OS X 10.5
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-06-30 08:15 PST by
Modified: 2009-07-06 10:19 PST (History)


Attachments
Patch to fix run-time crashes with winscw (5.73 KB, patch)
2009-06-30 08:18 PST, Simon Hausmann
mjs: review+
Review Patch | Details | Formatted Diff | Diff


Note

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


Description From 2009-06-30 08:15:18 PST
The Metrowerks compiler on the Symbian platform moves the globally
defined Hashtables into read-only memory, despite one of the members
being mutable. This causes crashes at run-time due to write access to
read-only memory.

This patch avoid the use of const with this compiler by introducing the
JSC_CONST_HASHTABLE macro.
------- Comment #1 From 2009-06-30 08:18:12 PST -------
Created an attachment (id=32066) [details]
Patch to fix run-time crashes with winscw
------- Comment #2 From 2009-06-30 14:37:10 PST -------
(From update of attachment 32066 [details])
Have we reported the issue to metroworks?  It seems useful to have a link to an bug in their tracker (if such a thing exists) or some way of knowing when we can revert this.  If this is the only way to fix this (modifying the source instead of passing an extra compiler flag or something), then this is totally a fine fix.  It just would be nice to know when we can remove it.
------- Comment #3 From 2009-07-01 01:23:33 PST -------
Yes, the issue is being tracked upstream in the Carbide Bugzilla at 

https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=8574

(the bugzilla seems to require account registration to see and comment on reports, but it's free for anyone)

I'm all for removing the workaround as soon as the compiler is fixed and a new release is available.
------- Comment #4 From 2009-07-05 04:33:24 PST -------
(From update of attachment 32066 [details])
r=me

I would suggest maybe making the comment above JSC_CONST_HASHTABLE a bit shorter, just stating that it's a workaround for a compiler bug should do.
------- Comment #5 From 2009-07-06 10:19:28 PST -------
Landed in 45553