www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - SIGSEGV in rt_finalize

reply Rory Mcguire <rjmcguire gm_no_ail.com> writes:
Hi guys,

I have a 265 line program that gets a segmentation fault if I don't comment 
out this while loop(I am not using delete or anything like it):
/+      while (lines.length > 0 && line.length > 3 && line[3]=='-') {
            line ~= lines[0];
            lines = lines[1..$];
        }+/

Any Ideas on how to track this one down?

Backtrace:
[Thread 0xf753cb70 (LWP 10053) exited]

Program received signal SIGSEGV, Segmentation fault.
0x08067798 in rt_finalize ()
(gdb) bt










-Rory
Jul 28 2010
parent reply "Steven Schveighoffer" <schveiguy yahoo.com> writes:
On Wed, 28 Jul 2010 11:45:59 -0400, Rory Mcguire <rjmcguire gm_no_ail.com>  
wrote:

 Hi guys,

 I have a 265 line program that gets a segmentation fault if I don't  
 comment
 out this while loop(I am not using delete or anything like it):
 /+      while (lines.length > 0 && line.length > 3 && line[3]=='-') {
             line ~= lines[0];
             lines = lines[1..$];
         }+/

 Any Ideas on how to track this one down?
No, please post the whole code, or a reduced example. What compiler version/platform? -Steve
Jul 29 2010
parent Rory Mcguire <rjmcguire gm_no_ail.com> writes:
Steven Schveighoffer wrote:

 On Wed, 28 Jul 2010 11:45:59 -0400, Rory Mcguire <rjmcguire gm_no_ail.com>
 wrote:
 
 Hi guys,

 I have a 265 line program that gets a segmentation fault if I don't
 comment
 out this while loop(I am not using delete or anything like it):
 /+      while (lines.length > 0 && line.length > 3 && line[3]=='-') {
             line ~= lines[0];
             lines = lines[1..$];
         }+/

 Any Ideas on how to track this one down?
No, please post the whole code, or a reduced example. What compiler version/platform? -Steve
I'll try make a reduced example.
Jul 29 2010