On Sunday, 14 December 2014 at 16:06:25 UTC, Martin Nowak wrote:
On 12/14/2014 03:50 PM, Gabor Mezo wrote:
Hello,

I've created a simple db dynamic lib project.

https://github.com/D-Programming-Language/dub/issues/352

Thanks,

I've did this, it finally build, but something is still not good.

If I call externals from another application, and my D code allocates anything on heap, the calling process crashes with SIGSEV. I mean it works:

extern (C)
{
        int ping()
        {
                return 555;
        }
}

But it doesn't:

extern (C)
{
        int ping()
        {
try { throw new Exception("foo"); } catch (Exception ex) { }
                return 555;
        }
}

or this one crashes too:

extern (C)
{
        int ping()
        {
                auto foo = new Object();
                return 555;
        }
}

Reply via email to