Why does a switch break cause a segmentation fault

eric at makechip.com eric at makechip.com
Mon Jul 22 22:54:52 UTC 2019


Shouldn't (stream == null) be (stream is null)? 

-Eric 


From: "adamgoldberg via Digitalmars-d-learn" <digitalmars-d-learn at puremagic.com> 
To: digitalmars-d-learn at puremagic.com 
Sent: Monday, July 22, 2019 3:05:17 PM 
Subject: Why does a switch break cause a segmentation fault 

Hey, I just happened to be writing a program in D an stumbled 
upon a bug, that causes it to terminate after receiving a SEGV 
signal, nothing wierd so far but it looks everything I tried 
shows it is the break statement inside of a switch. 
It seems to have a relatively random chance of occuring, and also 
somewhat dependant on the compiler, and build mode used. 
I'm short on time so instead of rewriting my SO post I will just 
link it. 

Here! 
https://stackoverflow.com/questions/57153617/random-segmentation-fault-in-d-lang-on-switch-break 

Hope someone can help! 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20190722/d4006388/attachment.html>


More information about the Digitalmars-d-learn mailing list