BlindMindStudios / AngelScript-JIT-Compiler

A Just-In-Time compiler for the AngelScript language on x86 processors.
www.blind-mind.com
237 stars 49 forks source link

formatInt from scriptstdstring add-on crashes with Jit #17

Open TheExDeus opened 9 years ago

TheExDeus commented 9 years ago

When I use AngelScript-JIT my application crashes (with corrupted stack so no backtrace) when I use formatInt in scripts. When I disable JIT it works fine. Strings themselves also works fine, but only formatFloat and formatInt crashes. parseFloat and parseInt doesn't crash.

Maybe others can replicate this?

AS version is AngelScript 2.29.2.

ThyReaper commented 9 years ago

I cannot replicate the issue. Could you provide a script that reproduces the error for you? Are you building 32 or 64 bit, and for Windows or Linux?

TheExDeus commented 9 years ago

I'm building 32bit on windows. I'll try reducing the code size. The issue might be with something else, as AS is a part of a much larger system.

TheExDeus commented 9 years ago

I can replicate the problem with Tutorial example that comes with AngelScript. Just add JIT to it and call a script having formatFloat or formatInt in it. Here is the script: http://pastebin.com/PcWkFMjm Here is the modified example: http://pastebin.com/eQzsb9cu

Even in this simple example the stack trace cannot be recovered, so I cannot really tell you what the problem is. I compile with gcc 4.9.2. Full config: http://pastebin.com/qgsshjg5

ThyReaper commented 9 years ago

Unfortunately, your reproduction case does not reproduce the issue for us.

xKamuna commented 7 years ago

This also happens for me, too, so it definitely happens on multiple computers. Even changing the name or definition to use to_string doesn't work. The workaround is to use the Generic versions of these functions.