D.gnu - Can't catch Phobos exceptions
- Demetri (22/22) Mar 17 2014 I wrote a small D program. When compiled with DMD, it works fine,
- Iain Buclaw (3/25) Mar 17 2014 SIGABRT is normally a sign of an assert(false) in release code in GDC.
- Johannes Pfau (4/22) Mar 17 2014 The example works fine here (with exactly the same parameters).
- Demetri (3/25) Mar 17 2014 I have GDC 4.8.2, 64 bit
- Demetri (2/29) Mar 17 2014
- Demetri (2/24) Mar 17 2014 What does gdc -v show on your system? That may help.
- Iain Buclaw (3/30) Mar 18 2014 On my work system, the last time I built gdc was around 2014/02/21.
- Demetri (5/41) Apr 01 2014 Sorry everyone!
I wrote a small D program. When compiled with DMD, it works fine, but neither GDC nor LDC2 can catch exceptions thrown from Phobos (proven by GDB). How do I fix this? Example code: import std.process; void main(){ try { spawnProcess(["/dev/null"]); } catch (Throwable p) { return; } } which dies with SIGABRT when compiled and executed, even though the catch block should catch the ProcessException. Compiler: ldc2 based on LLVM 3.3 and DMD 2.063.2 (invoked via ldmd2 -O -inline -release), but also happens with gdc 4.8.2 (invoked via gdmd -O -inline -release). The execption is caught when I use dmd -O -inline -release to compile, even when I only catch ProcessException and not Throwable.
Mar 17 2014
On 17 March 2014 18:13, Demetri <Supernova2003dh yahoo.com> wrote:I wrote a small D program. When compiled with DMD, it works fine, but neither GDC nor LDC2 can catch exceptions thrown from Phobos (proven by GDB). How do I fix this? Example code: import std.process; void main(){ try { spawnProcess(["/dev/null"]); } catch (Throwable p) { return; } } which dies with SIGABRT when compiled and executed, even though the catch block should catch the ProcessException. Compiler: ldc2 based on LLVM 3.3 and DMD 2.063.2 (invoked via ldmd2 -O -inline -release), but also happens with gdc 4.8.2 (invoked via gdmd -O -inline -release). The execption is caught when I use dmd -O -inline -release to compile, even when I only catch ProcessException and not Throwable.SIGABRT is normally a sign of an assert(false) in release code in GDC. Try running a backtrace on the application.
Mar 17 2014
Am Mon, 17 Mar 2014 18:13:36 +0000 schrieb "Demetri" <Supernova2003dh yahoo.com>:I wrote a small D program. When compiled with DMD, it works fine, but neither GDC nor LDC2 can catch exceptions thrown from Phobos (proven by GDB). How do I fix this? Example code: import std.process; void main(){ try { spawnProcess(["/dev/null"]); } catch (Throwable p) { return; } }The example works fine here (with exactly the same parameters). Do you have a recent GDC? 32bit/64bit?
Mar 17 2014
I have GDC 4.8.2, 64 bit Should I upgrade to 4.9? On Monday, 17 March 2014 at 18:52:49 UTC, Johannes Pfau wrote:Am Mon, 17 Mar 2014 18:13:36 +0000 schrieb "Demetri" <Supernova2003dh yahoo.com>:I wrote a small D program. When compiled with DMD, it works fine, but neither GDC nor LDC2 can catch exceptions thrown from Phobos (proven by GDB). How do I fix this? Example code: import std.process; void main(){ try { spawnProcess(["/dev/null"]); } catch (Throwable p) { return; } }The example works fine here (with exactly the same parameters). Do you have a recent GDC? 32bit/64bit?
Mar 17 2014
I tried reinstalling GDC, but this test faild with GDC 4.9 On Monday, 17 March 2014 at 20:20:24 UTC, Demetri wrote:I have GDC 4.8.2, 64 bit Should I upgrade to 4.9? On Monday, 17 March 2014 at 18:52:49 UTC, Johannes Pfau wrote:Am Mon, 17 Mar 2014 18:13:36 +0000 schrieb "Demetri" <Supernova2003dh yahoo.com>:I wrote a small D program. When compiled with DMD, it works fine, but neither GDC nor LDC2 can catch exceptions thrown from Phobos (proven by GDB). How do I fix this? Example code: import std.process; void main(){ try { spawnProcess(["/dev/null"]); } catch (Throwable p) { return; } }The example works fine here (with exactly the same parameters). Do you have a recent GDC? 32bit/64bit?
Mar 17 2014
On Monday, 17 March 2014 at 18:52:49 UTC, Johannes Pfau wrote:Am Mon, 17 Mar 2014 18:13:36 +0000 schrieb "Demetri" <Supernova2003dh yahoo.com>:What does gdc -v show on your system? That may help.I wrote a small D program. When compiled with DMD, it works fine, but neither GDC nor LDC2 can catch exceptions thrown from Phobos (proven by GDB). How do I fix this? Example code: import std.process; void main(){ try { spawnProcess(["/dev/null"]); } catch (Throwable p) { return; } }The example works fine here (with exactly the same parameters). Do you have a recent GDC? 32bit/64bit?
Mar 17 2014
On 18 March 2014 01:20, Demetri <Supernova2003dh yahoo.com> wrote:On Monday, 17 March 2014 at 18:52:49 UTC, Johannes Pfau wrote:On my work system, the last time I built gdc was around 2014/02/21. I cannot reproduce this.Am Mon, 17 Mar 2014 18:13:36 +0000 schrieb "Demetri" <Supernova2003dh yahoo.com>:What does gdc -v show on your system? That may help.I wrote a small D program. When compiled with DMD, it works fine, but neither GDC nor LDC2 can catch exceptions thrown from Phobos (proven by GDB). How do I fix this? Example code: import std.process; void main(){ try { spawnProcess(["/dev/null"]); } catch (Throwable p) { return; } }The example works fine here (with exactly the same parameters). Do you have a recent GDC? 32bit/64bit?
Mar 18 2014
On Tuesday, 18 March 2014 at 09:21:05 UTC, Iain Buclaw wrote:On 18 March 2014 01:20, Demetri <Supernova2003dh yahoo.com> wrote:Sorry everyone! The problem was one on my end that was causing all sorts of things to crash. Not being able to catch Phobos exceptions was just the first sign.On Monday, 17 March 2014 at 18:52:49 UTC, Johannes Pfau wrote:On my work system, the last time I built gdc was around 2014/02/21. I cannot reproduce this.Am Mon, 17 Mar 2014 18:13:36 +0000 schrieb "Demetri" <Supernova2003dh yahoo.com>:What does gdc -v show on your system? That may help.I wrote a small D program. When compiled with DMD, it works fine, but neither GDC nor LDC2 can catch exceptions thrown from Phobos (proven by GDB). How do I fix this? Example code: import std.process; void main(){ try { spawnProcess(["/dev/null"]); } catch (Throwable p) { return; } }The example works fine here (with exactly the same parameters). Do you have a recent GDC? 32bit/64bit?
Apr 01 2014