Sign in to follow this  
cvet

Bytecode x64 -> x32

Recommended Posts

Hello, Andreas!

Something wrong with bytecode restoring compiled in x64 environment and restored in x32 environment.

LoadByteCode calls without error, but in script I've got strange 'Null pointer access'.

Please look what can be wrong, if you will not find problem then I try research this problem more.

Also I try combination of x64->x64, x32->x32, x32->x64 and it works fine.

AngelScript revision 2334, Windows, VS2015.

Share this post


Link to post
Share on other sites

I'll need more information. Does it happen with all scripts? Or just some? Can you narrow it down to a specific function in the script that fails?

 

The byte code when saved from x64 or from x32 should be identical. Can you do a diff on the saved bytecode to find the first byte that is different, and then debug the code while saving to let me know what is being saved at that specific byte?

Share this post


Link to post
Share on other sites

Thanks.

 

I've identified that the problem is with the byte code instruction asBC_ChkNullS. This instruction is used to check if a pointer pushed on the stack is null. The offset that the instruction takes as argument must be adjusted when saving and loading the byte code according to the size of pointers.

 

I'll provide a solution for this as soon as possible.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this