Re: "catch" not catching the correct exception

2018-07-26 Thread kinke via Digitalmars-d
On Thursday, 26 July 2018 at 07:38:08 UTC, Shachar Shemesh wrote: Mecca doesn't call that. Should it? Can that be the problem? Very likely so. It's (normally) used in core.thread.Thread's push/popContext() when switching into a fiber.

Re: "catch" not catching the correct exception

2018-07-26 Thread Shachar Shemesh via Digitalmars-d
On 26/07/18 10:31, Seb wrote: On Thursday, 26 July 2018 at 05:52:51 UTC, Shachar Shemesh wrote: At which point I'm stuck. I don't know how D's catch matching works, so I don't know where to continue looking. https://github.com/dlang/druntime/blob/master/src/rt/dwarfeh.d You still use druntime

Re: "catch" not catching the correct exception

2018-07-26 Thread Shachar Shemesh via Digitalmars-d
On 26/07/18 09:22, rikki cattermole wrote: Hmm, sounds like the vtable and hence TypeInfo part of the reference is getting corrupted. Have you checked that the type matches where you throw it? Is that what "classinfo" returns? Because if so, it's printed by the logs I pasted in my question,

Re: "catch" not catching the correct exception

2018-07-26 Thread Seb via Digitalmars-d
On Thursday, 26 July 2018 at 05:52:51 UTC, Shachar Shemesh wrote: At which point I'm stuck. I don't know how D's catch matching works, so I don't know where to continue looking. https://github.com/dlang/druntime/blob/master/src/rt/dwarfeh.d You still use druntime, right?

Re: "catch" not catching the correct exception

2018-07-25 Thread rikki cattermole via Digitalmars-d
Hmm, sounds like the vtable and hence TypeInfo part of the reference is getting corrupted. Have you checked that the type matches where you throw it?

"catch" not catching the correct exception

2018-07-25 Thread Shachar Shemesh via Digitalmars-d
Under mecca, we're using GC free exceptions. I have code that uses mkEx (https://github.com/weka-io/mecca/blob/master/src/mecca/lib/exception.d#L307). Essentially, it constructs an exception in place inside a fiber-local buffer. The construction code seems correct, and the parent seems set co