Bug 79271

Summary: Allocations from CopiedBlocks should always be 8-byte aligned
Product: WebKit Reporter: Mark Hahnenberg <mhahnenberg>
Component: JavaScriptCoreAssignee: Mark Hahnenberg <mhahnenberg>
Status: RESOLVED FIXED    
Severity: Normal CC: fpizlo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 79199    
Attachments:
Description Flags
Patch ggaren: review+

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+
Mark Hahnenberg
Comment 1 2012-02-22 13:55:15 PST
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
Note You need to log in before you can comment on or make changes to this bug.