Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


- - - - -

JIT compiler crashes


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 thd.MM   Members   -  Reputation: 208

Like
0Likes
Like

Posted 23 March 2013 - 07:24 PM

I'm having trouble running the JIT compiler -> https://github.com/BlindMindStudios/AngelScript-JIT-Compiler

 

I tried running it with the angelscript version that was last supported by the JIT compiler. I set it up as in the provided example and I finalize pages after script compiles.

 

It gives either a buffer overrun or heap corruption error on the very first script it does. Showing the code is kind of pointless cause its long and convoluted. If anyone is interested in helping me with this I can provide the source code. But I wonder if I am maybe doing something wrong.

 

The crashes happen in random location in the jit files:

like this http://grab.by/kYPw

 

I tried running the JIT with some compatibility stuff like this:

 jit = new asCJITCompiler(JIT_NO_SCRIPT_CALLS | JIT_NO_SUSPEND | JIT_NO_SWITCHES); 

 

but it also crashes in a different place:

http://grab.by/kYPo



Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3416

Like
0Likes
Like

Posted 24 March 2013 - 03:42 PM

As far I know there haven't been any changes in AngelScript's VM that would break the JIT since the last update that Blind Mind Studios did to it. 

 

The JIT compiler requires C++0x feature support according to the readme. One would think it would be compatible with C++11 too, but it's difficult to know for sure.

 

What C++ compiler are you using using? 


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#3 thd.MM   Members   -  Reputation: 208

Like
0Likes
Like

Posted 25 March 2013 - 12:52 PM

Visual Studio 2010. It compiles fine, just crashes at run-time



#4 ThyReaper   Members   -  Reputation: 486

Like
0Likes
Like

Posted 25 March 2013 - 01:57 PM

It is important to know the script code that crashes the JIT, as that is the only way to reliably identify the crash. It may be possible to identify the problem on our end with only the line of script that crashes the JIT.



#5 thd.MM   Members   -  Reputation: 208

Like
0Likes
Like

Posted 29 March 2013 - 10:50 PM

The thing is, it's a heap corruption so it happens at random locations. I'll try to track down the line or function though...



#6 thd.MM   Members   -  Reputation: 208

Like
0Likes
Like

Posted 02 April 2013 - 12:40 AM

I made a smaller case and found the issue. The JIT compiler doesn't work with virtual functions. Whenever there was a virtual function binding in my engine it crashed with a heap corruption after that. ThyReaper did you know about this?

 

 

I made some benchmarks after I made it work and they were quite disheartening. Running with the JIT compiler is actually SLOWER than without it. Did anyone do benchmarks of their own with JIT on/off?


#7 ThyReaper   Members   -  Reputation: 486

Like
0Likes
Like

Posted 03 April 2013 - 09:30 PM

Virtual functions are supported, and we have both an existing game and an active project that use virtual functions bound to the JIT. Could you provide an example of the function that is causing the issue, and the way you bound it to AngelScript?

 

As for performance, unless you are regularly calling functions that can't be directly JIT'd (we fallback to AngelScript's calling system), there should be at least a doubling of performance. Again, it would be helpful to have examples to go off of to see why you might be getting poor performance. Without scripts or code, I can only guess at what is wrong.


Edited by ThyReaper, 03 April 2013 - 09:30 PM.


#8 thd.MM   Members   -  Reputation: 208

Like
0Likes
Like

Posted 04 April 2013 - 12:34 AM

Thanks, sent you a PM.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS