Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

ScriptFunctionData::stackNeeded does not account for asBC_ALLOC potential stack push

$
0
0

Hi,

I found a possible problem in the compiler/VM while working on my JIT.
While I can work around it easily (so it is low priority for me), I'm suspecting this could (very rarely) cause issues in AS.

The following code:

class Foo
{
    Foo() {}

    string s;
}

void repro()
{
    Foo f;
}

Gives the following:

Function Foo::Foo()
scriptData.variableSpace: 0
scriptData.stackNeeded: 2
Disassembly:
0007: PshVPtr 0
0008: ADDSi 32
000a: ALLOC 93874889212816 19
0015: RET 2

In the VM, in the asBC_ALLOC handler, when the object to allocate is not a script object, the pointer to the allocated …


Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>