WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
34939
Fix the SP at ctiOpThrowNotCaught on Thumb2 (JSVALUE32)
https://bugs.webkit.org/show_bug.cgi?id=34939
Summary
Fix the SP at ctiOpThrowNotCaught on Thumb2 (JSVALUE32)
Gabor Loki
Reported
2010-02-15 05:01:19 PST
There is a typo inside ctiOpThrowNotCaught for JSValue32 on Thumb2. The SP addition should be 0x40 (according to ctiTrampoline).
Attachments
Fix the SP at ctiOpThrowNotCaught on Thumb2 (JSVALUE32)
(1.29 KB, patch)
2010-02-15 05:02 PST
,
Gabor Loki
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Gabor Loki
Comment 1
2010-02-15 05:02:56 PST
Created
attachment 48747
[details]
Fix the SP at ctiOpThrowNotCaught on Thumb2 (JSVALUE32)
Zoltan Herczeg
Comment 2
2010-02-15 05:30:09 PST
Nice catch. Oh wait, this is a fix for not catch :)
Gabor Loki
Comment 3
2010-02-15 05:41:03 PST
> Nice catch. Oh wait, this is a fix for not catch :)
Hahaha. Thanks Pal! ;)
Gavin Barraclough
Comment 4
2010-02-15 22:41:26 PST
Comment on
attachment 48747
[details]
Fix the SP at ctiOpThrowNotCaught on Thumb2 (JSVALUE32) r+, but... Here's one way you could make this awesomer. The underlying problem here is that the hardcoded constants in the asm make this code really error prone - it's really easy to miss one of these & end up with a typo like this. So. The magic value 0x40 represents the amount of stack frame that needs to be dynamically allocated on entry through the cti trampoline stub. We expect this to be equal to the offset of enabledProfilerReference within JITStackFrame (and assert such in the JITThunks constructor). You could so something like: #define JIT_STACK_FRAME_ALLOCATION 0x40 #define JIT_STACK_FRAME_ALLOCATION_string STRINGIZE(JIT_STACK_FRAME_ALLOCATION) then change all the asm to use this string instead of the hardcoded constant, e.g.: "add sp, sp," JIT_STACK_FRAME_ALLOCATION_string "\n" and make the assert in JITThunks::JITThunks be: // The fifth argument is the first item already on the stack. ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, enabledProfilerReference) == JIT_STACK_FRAME_ALLOCATION); Less had coded constants should hopefully make this code less fragile in the future. r+ with or without the asm/ASSERT changes suggested.
WebKit Commit Bot
Comment 5
2010-02-15 23:42:26 PST
Comment on
attachment 48747
[details]
Fix the SP at ctiOpThrowNotCaught on Thumb2 (JSVALUE32) Clearing flags on attachment: 48747 Committed
r54809
: <
http://trac.webkit.org/changeset/54809
>
WebKit Commit Bot
Comment 6
2010-02-15 23:42:33 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug