Code Monkey home page Code Monkey logo

Comments (8)

Lucas7211 avatar Lucas7211 commented on May 28, 2024

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.

bluecataudio avatar bluecataudio commented on May 28, 2024

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.

bluecataudio avatar bluecataudio commented on May 28, 2024

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.

Lucas7211 avatar Lucas7211 commented on May 28, 2024

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.

bluecataudio avatar bluecataudio commented on May 28, 2024

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.

bluecataudio avatar bluecataudio commented on May 28, 2024

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.

ThyReaper avatar ThyReaper commented on May 28, 2024

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.

bluecataudio avatar bluecataudio commented on May 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.