Bug 164806

Summary: tryAppendLea doesn't consider that something representable as an int32_t might actually be a Const64Value
Product: WebKit Reporter: Saam Barati <saam>
Component: JavaScriptCoreAssignee: Saam Barati <saam>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: benjamin, fpizlo, ggaren, gskachkov, jfbastien, keith_miller, mark.lam, msaboff, oliver, ticaiolima, ysuzuki
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Saam Barati
Reported 2016-11-15 17:11:51 PST
There is code like this: ``` if (value->child(1)->isRepresentableAs<int32_t>() && canBeInternal(value->child(0)) && value->child(0)->opcode() == Add) { innerAdd = value->child(0); offset = value->child(1)->asInt32(); value = value->child(0); } ``` It calls asInt32(). It should be calling static_cast<int32_t>(asInt()).
Attachments
Saam Barati
Comment 1 2016-11-28 12:48:36 PST
I'm doing this in the other bug where I found this. *** This bug has been marked as a duplicate of bug 163865 ***
Note You need to log in before you can comment on or make changes to this bug.