www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - relase breaks somthing??

reply BCS <ao pathlink.com> writes:
I have a program that compiles and runs fine unless I give it the release 
flag. Then it dies with a seg-v. Are there any known issues along this line?
May 01 2007
parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"BCS" <ao pathlink.com> wrote in message 
news:ce0a33439d808c95a0759e2a784 news.digitalmars.com...
I have a program that compiles and runs fine unless I give it the release 
flag. Then it dies with a seg-v. Are there any known issues along this 
line?
POST CODE.
May 01 2007
parent reply BCS <ao pathlink.com> writes:
Reply to Jarrett,

 "BCS" <ao pathlink.com> wrote in message
 news:ce0a33439d808c95a0759e2a784 news.digitalmars.com...
 
 I have a program that compiles and runs fine unless I give it the
 release flag. Then it dies with a seg-v. Are there any known issues
 along this line?
 
POST CODE.
I can't, it's for work. Mostly I'm asking if anyone known of somthing to look for. When I find the problem, I'll post a minimal case.
May 01 2007
parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
BCS wrote:
 Reply to Jarrett,
 
 "BCS" <ao pathlink.com> wrote in message
 news:ce0a33439d808c95a0759e2a784 news.digitalmars.com...

 I have a program that compiles and runs fine unless I give it the
 release flag. Then it dies with a seg-v. Are there any known issues
 along this line?
POST CODE.
I can't, it's for work. Mostly I'm asking if anyone known of somthing to look for. When I find the problem, I'll post a minimal case.
Look for doing something in a precondition that is required for correct operation of your program. (Maybe a check you perform actually causes an object to initialize its state or something). --bb
May 01 2007
parent Daniel Keep <daniel.keep.lists gmail.com> writes:
Bill Baxter wrote:
 BCS wrote:
 Reply to Jarrett,

 "BCS" <ao pathlink.com> wrote in message
 news:ce0a33439d808c95a0759e2a784 news.digitalmars.com...

 I have a program that compiles and runs fine unless I give it the
 release flag. Then it dies with a seg-v. Are there any known issues
 along this line?
POST CODE.
I can't, it's for work. Mostly I'm asking if anyone known of somthing to look for. When I find the problem, I'll post a minimal case.
Look for doing something in a precondition that is required for correct operation of your program. (Maybe a check you perform actually causes an object to initialize its state or something). --bb
I had the reverse problem once: my program would seg-v if I threw -debug. I think I eventually nailed it down by using writeflns to determine where abouts the crash was happening (actually before main() got called), then slowly removing debug {}, in {}, out {} and invariant {} code until it stopped. Turned out I was asserting a property of an object whose reference was null; silly me. The other thing you can do is load the program up into ddbg (if you're on Windows; otherwise, try another debugger) and see if it will tell you where you're segfaulting. -- Daniel -- int getRandomNumber() { return 4; // chosen by fair dice roll. // guaranteed to be random. } http://xkcd.com/ v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/
May 01 2007