Bug 26843 - Fix run-time crashes in JavaScriptCore on Symbian with Metrowerks compiler
Summary: Fix run-time crashes in JavaScriptCore on Symbian with Metrowerks compiler
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-30 08:15 PDT by Simon Hausmann
Modified: 2009-07-06 10:19 PDT (History)
2 users (show)

See Also:


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

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Hausmann 2009-06-30 08:15:18 PDT
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 Simon Hausmann 2009-06-30 08:18:12 PDT
Created attachment 32066 [details]
Patch to fix run-time crashes with winscw
Comment 2 Eric Seidel (no email) 2009-06-30 14:37:10 PDT
Comment on attachment 32066 [details]
Patch to fix run-time crashes with winscw

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 Simon Hausmann 2009-07-01 01:23:33 PDT
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 Maciej Stachowiak 2009-07-05 04:33:24 PDT
Comment on attachment 32066 [details]
Patch to fix run-time crashes with winscw

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 Simon Hausmann 2009-07-06 10:19:28 PDT
Landed in 45553