Bug 164806 - tryAppendLea doesn't consider that something representable as an int32_t might actually be a Const64Value
Summary: tryAppendLea doesn't consider that something representable as an int32_t migh...
Status: RESOLVED DUPLICATE of bug 163865
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-15 17:11 PST by Saam Barati
Modified: 2016-11-28 12:48 PST (History)
11 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 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()).
Comment 1 Saam Barati 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 ***