abcasm: callstatic emits 2 different errors for invalid method_info indices

VERIFIED WORKSFORME

Status

Tamarin
Tools
--
minor
VERIFIED WORKSFORME
9 years ago
8 years ago

People

(Reporter: Chris Peyer, Assigned: Tom Harwood)

Tracking

unspecified
Future

Details

(Reporter)

Description

9 years ago
Specifiying a positive invalid method_info index results in an assertion:

function main() {
    getlocal0
    pushscope
    findproperty String
    callstatic 100 0
    returnvoid
}

0 running abcasm/test.abs
verify global$init()
stack:
scope: ~
locals: global
0:getlocal0
stack: global
scope: ~
locals: global
1:pushscope
stack:
scope: global
locals: global
2:findproperty {public,}::String
stack: global
scope: global
locals: global
4:Assertion failed: "((index < len))" ("/Users/build/buildbot/tamarin-redux/mac-intel-10_5/tamarin-redux/core/avmplusList.h":330)

Specifiying a negative invalid method_info index results in a correct verifier error:

function main() {
    getlocal0
    pushscope
    findproperty String
    callstatic -1 0
    returnvoid
}

0 running abcasm/test.abs
verify global$init()
stack:
scope: ~
locals: global
0:getlocal0
stack: global
scope: ~
locals: global
1:pushscope
stack:
scope: global
locals: global
2:findproperty {public,}::String
VerifyError: Error #1107: The ABC data is corrupt, attempt to read out of bounds.

Updated

8 years ago
Target Milestone: --- → Future
(Assignee)

Comment 1

8 years ago
I can repro, but a release build shows the 1107 error in both cases.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WORKSFORME
(Reporter)

Updated

8 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.