Comments (8)
I don't have access to an OSX machine to test it on atm, but the problem should be fixed in 88c47cd.
from angelscript-jit-compiler.
Thank you! I can confirm that it now runs fine on OSX in 32-bit mode (and still works fine on other platforms). You can close the issue!
from angelscript-jit-compiler.
Actually I have been a bit too fast: this fixes the issue on 32-bit Mac, but there is now another problem on 64-bit Mac, which I suspect comes from the way function calls are now made:
malloc: ** error for object 0x101518898: incorrect checksum for freed object - object was probably modified after being freed.
* set a breakpoint in malloc_error_break to debug
This happens when registering the array extension as well as std::string. I have tried to import only the changes that relate to the global thiscall fix and it seems to be triggering this issue. The crash happens with the following stack (no script is actually run: just instantiating the engine, registering the JIT and the extensions produces the crash):
#7 0x00000001000e9b11 in asCArray<asCString>::Allocate at source/as_array.h:267
#8 0x00000001000e9c63 in asCArray<asCString>::~asCArray() ()
#9 0x00000001000f65f4 in asCScriptFunction::~asCScriptFunction() ()
#10 0x00000001000f613b in asCScriptFunction::Release() const ()
#11 0x00000001000818c9 in asCConfigGroup::RemoveConfiguration(asCScriptEngine, bool) ()
#12 0x00000001000e14bb in asCScriptEngine::~asCScriptEngine() ()
#13 0x00000001000dee8b in asCScriptEngine::Release() const ()
unfortunately my knowledge of assembly and function calls is not good enough to understand which exact change triggers this crash.
from angelscript-jit-compiler.
SystemCall::call_thiscall is never used in the 64-bit code path, so changes to that function cannot have caused this. There's probably still something broken about ASGLOBAL, but I can't replicate it at the moment.
from angelscript-jit-compiler.
Sorry, I indeed meant the part of the code that fixes ASGLOBAL. Before your fix it used to work in 64-bit and fail in 32-bit whereas now that's the contrary (with a different error though since it breaks other parts of the code that do not use ASGLOBAL).
from angelscript-jit-compiler.
Hi,
Have you been able to find out the problem? The new version of the code is actually worse on Mac than before the fix because it crashes right away when registering extensions, whereas before the fix just avoiding ASGLOBAL functions works.
I will try to explore the changes in details and see if I can find out something.
from angelscript-jit-compiler.
Unfortunately, we have no development environment setup for Mac right now, and don't technically support it until then. Fortunately, that probably isn't far off from now.
Any additional information you can provide might let us fix it before we can test it ourselves.
from angelscript-jit-compiler.
Thanks again for the support. After checking the changes once again, it seems that they should only affect the 32-bit build anyway. So i have downloaded the latest version of the JIT compiler from the trunk and rebuilt everything. It seems to be running fine now (apart from another issue, but it is not linked). The problem I previously encountered could have been a build or merge issue (XCode has lots of problems with dependencies management). Sorry for that!
from angelscript-jit-compiler.
Related Issues (20)
- angelscript v2.28 support? HOT 1
- Wrong double value returned with class method (Mac / 32-bit) HOT 13
- Version compatibility? HOT 1
- valgrind detects invalid write in virtual_asm.h HOT 4
- int64 issue HOT 2
- "Short jump too long." exception in msvc x64 project without JIT_FAST_REFCOUNT flag HOT 4
- shift int64 right HOT 5
- formatInt from scriptstdstring add-on crashes with Jit HOT 5
- AS 2.3 Support HOT 4
- Suspend Bug
- asBC_POW x86_64 issue HOT 1
- Warning C4267
- AngelScript wiith JIT: calling function of the POD type corrputs stack HOT 2
- Random crash with variable passed locally HOT 8
- decomplie byte code to src supported? HOT 1
- Argument clobbering & bad return value for DoesReturnOnStack HOT 1
- Any chance this will get updated for newer AngelScript versions?
- crash with object handles if not using JIT_FAST_REFCOUNT HOT 1
- Exception thrown on OSX / 64-bit if not using JIT_FAST_REFCOUNT HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angelscript-jit-compiler.