Coder Social home page Coder Social logo

Comments (5)

agraef avatar agraef commented on June 8, 2024

This was previously reported by Jiri Spitz as BB Issue #10, and there's a related mailing list thread from 2013.

As suggested by Jiri, about the simplest way to reproduce the issue is to run this in the interpreter:

[1,2]!5;

from pure-lang.

agraef avatar agraef commented on June 8, 2024

Just for the record, the root cause seems to be that mingw64 uses SJLJ itself in order to implement C++ exceptions, which of course gets in the way of Pure's own use of SJLJ. This is discussed at length in the aforementioned ticket and ml conversation.

from pure-lang.

agraef avatar agraef commented on June 8, 2024

Looks like using __builtin_setjmp and __builtin_longjmp instead of the msvc versions of setjmp/longjmp should fix this, cf. http://www.agardner.me/golang/windows/cgo/64-bit/setjmp/longjmp/2016/02/29/go-windows-setjmp-x86.html. Currently giving this a try.

from pure-lang.

agraef avatar agraef commented on June 8, 2024

Fixed in rev. 088b875.

from pure-lang.

agraef avatar agraef commented on June 8, 2024

Still segfaults (at random) when running pure test011.pure from bash. Unfortunately, the gdb backtrace isn't particularly helpful:

(gdb) bt
#0  0x00007ff8db824faf in ntdll!RtlpNtMakeTemporaryKey ()
   from C:\Windows\SYSTEM32\ntdll.dll
#1  0x00007ff8db7e6d07 in ntdll!memset () from C:\Windows\SYSTEM32\ntdll.dll
#2  0x00007ff8db823ebd in ntdll!RtlpNtMakeTemporaryKey ()
   from C:\Windows\SYSTEM32\ntdll.dll
#3  0x00007ff8db7d53ac in ntdll!memset () from C:\Windows\SYSTEM32\ntdll.dll
#4  0x00007ff8db746a99 in ntdll!RtlFreeHeap ()
   from C:\Windows\SYSTEM32\ntdll.dll
#5  0x00007ff8db4e984c in msvcrt!free () from C:\Windows\System32\msvcrt.dll
#6  0x000000000015ce57 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

from pure-lang.

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.