awayfl / avm2 Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Missing implementation: BYTECODE 59 GETDESCENDANTS
Looks like this is implemented in INT, but not in JIT
https://github.com/awayfl/avm2/blob/dev/lib/int.ts#L573
caused by this code:
var employees:XML =
<employees>
<employee ssn="123-123-1234">
<name first="John" last="Doe"/>
<address>
<street>11 Main St.</street>
<city>San Francisco</city>
<state>CA</state>
<zip>98765</zip>
</address>
</employee>
<employee ssn="789-789-7890">
<name first="Mary" last="Roe"/>
<address>
<street>99 Broad St.</street>
<city>Newton</city>
<state>MA</state>
<zip>01234</zip>
</address>
</employee>
</employees>;
trace(employees..zip[0]);
Description
AwayFL is crashing while parsing the ABC of the Papa's Freezeria SWF file. The error is:
Uncaught TypeError: Cannot read properties of undefined (reading 'namespaces')
at ABCFile._parseMultiname (ABCFile.js:201:1)
at ABCFile._parseMultinames (ABCFile.js:150:1)
at new ABCFile (ABCFile.js:29:1)
at FlashSceneGraphFactory.executeABCBytes (FlashSceneGraphFactory.js:33:1)
at SWFParser.parseSymbols (SWFParser.js:233:1)
at SWFParser._pProceedParsing (SWFParser.js:218:1)
at ParserBase._pOnInterval (ParserBase.js:257:1)
at ParserBase._this._pOnIntervalDelegate (ParserBase.js:48:1)
at ListenerObject.dispatchEvent (EventDispatcher.js:99:1)
at EventDispatcher.dispatchEvent (EventDispatcher.js:50:1)
I've bisected this regression to commit 0906b7c. The SWF works fine before this commit is applied.
Steps to reproduce the issue
To reproduce the problem, try to load the current Papa's Freezeria SWF from Coolmath into the current version of AwayFL.
Source:
import flash.net.SharedObject;
var array = ['data'];
var so: SharedObject = SharedObject.getLocal("test");
if(!so.data.array) {
trace('write', array);
so.data.array = array;
so.flush();
so.close();
}
var so2: SharedObject = SharedObject.getLocal("test");
trace('read');
for(var r in so2.data) {
trace('Passed');
break;
}
Expected:
First start:
Second start:
Actual:
First start:
Second start:
Problem location:
https://github.com/awayfl/avm2/blob/dev/lib/nat/ASObject.ts#L432
For serialised objects it return false and method always return 0.
The source length is 106583 in as3 ,but I got 100886.
And ByteArray.ts has no method compress and uncompress function.
Invalid parsing of arrays.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.