WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
79271
Allocations from CopiedBlocks should always be 8-byte aligned
https://bugs.webkit.org/show_bug.cgi?id=79271
Summary
Allocations from CopiedBlocks should always be 8-byte aligned
Mark Hahnenberg
Reported
2012-02-22 13:06:45 PST
Currently, we only assert that allocations are pointer aligned. Since we don't want JSValues to potentially span cache lines, we need to make sure that all backing stores for storing JSValues are always 8-byte aligned.
Attachments
Patch
(6.28 KB, patch)
2012-02-22 13:55 PST
,
Mark Hahnenberg
ggaren
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Mark Hahnenberg
Comment 1
2012-02-22 13:55:15 PST
Created
attachment 128282
[details]
Patch
Geoffrey Garen
Comment 2
2012-02-22 14:06:45 PST
Comment on
attachment 128282
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=128282&action=review
r=me
> Source/JavaScriptCore/wtf/StdLibExtras.h:120 > + ASSERT(sizeof(unsigned long long) == 8); > + return !((unsigned long long)(p) & (sizeof(unsigned long long) - 1));
The best data type for the cast is uintptr_t. There's no reason to use sizeof(unsigned long long). You should just use 7 and 8, which is what your function guarantees, or sizeof(JSValue), since that's what you're worried about, or sizeof(double), which you should also be worried about.
Mark Hahnenberg
Comment 3
2012-02-22 14:27:51 PST
Committed
r108553
: <
http://trac.webkit.org/changeset/108553
>
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