Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT does not work on MinGW (Windows) builds #15

Closed
asumagic opened this issue Dec 21, 2019 · 3 comments
Closed

JIT does not work on MinGW (Windows) builds #15

asumagic opened this issue Dec 21, 2019 · 3 comments
Labels
asjit AngelScript JIT related issue bug Something isn't working done

Comments

@asumagic
Copy link
Owner

Causes a segfault early.

@asumagic asumagic added bug Something isn't working asjit AngelScript JIT related issue labels Dec 21, 2019
@asumagic
Copy link
Owner Author

asumagic commented Feb 9, 2020

Doesn't seem to crash anymore but:

  • formatFloat calls are suspiciously extremely slow.
  • It fails to load "world.png" because a script appears to select a corrupt string.

@asumagic
Copy link
Owner Author

asumagic commented Feb 9, 2020

The former appears to be related to BlindMindStudios/AngelScript-JIT-Compiler#17. Forcing the generic calling convention for formatting functions fixes the issue. A corrupted parameter causes an abnormally big string to be instantiated, resulting in significant slowdowns. I can't see a reason why in particular, this is the 4th parameter and should be stored in a register, so I doubt it's about a forgotten detail of the calling convention. Maybe it has to do with the string reference being passed as the 2nd parameter?

The latter appears to be a corruption issue of the 4th parameter of CMap::CreateTileMap, which takes in the path to the world texture. This could be due to stack corruption of some sort, as that parameter would be in reality the 5th (due to the implicit this pointer passed in RCX), which in the MS x64 convention is the first one that gets pushed to the stack.
So -- it might be that it either is written incorrectly to the stack or something. Find a repro?

@asumagic
Copy link
Owner Author

asumagic commented Aug 6, 2020

Will be fixed in 3338-v12 (probably)

@asumagic asumagic closed this as completed Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asjit AngelScript JIT related issue bug Something isn't working done
Projects
None yet
Development

No branches or pull requests

1 participant