delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/02/19:36:00

Date: Thu, 2 Apr 1998 16:33:28 -0800 (PST)
Message-Id: <199804030033.QAA19985@adit.ap.net>
Mime-Version: 1.0
To: "John M. Aldrich" <fighteer AT cs DOT com>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: This should run fine... but doesn't ?? Arrrggghhh!!

At 12:12  4/2/1998 -0500, John M. Aldrich wrote:
>Eric J. Whitney wrote:
[snipped]
>> What have I done wrong???   It runs fine with one instance of the
>> Matrix, but for two, it crashes!!!
>> I have stepped through it using F8 and it always crashes right where the
>> second matrix is initialised.
>
>Without actual sample code that we can compile and test for ourselves,
>there's no way to be certain what your problem is.  I can certainly make
>some guesses, though:

> - According to that traceback, the crash occurs in free() which is
>called by delete, which is called from Array::Setsize().  Therefore,
>check that Array::SetSize() is calling delete with a valid pointer
>argument that was allocated by new.

Also check to make sure you aren't corrupting the `malloc' arena; writing
past the end of an array will do this. I think the MSS package may be able
to catch such errors.

>with '-sjlj-exceptions' (sp?), and wait for a patch to fix the bug.

I believe it's `-fsjlj-exceptions', but I haven't checked (don't have 2.8).

Btw, I think that may take the prize for "Compiler Option Most Closely
Resembling Line Noise". :) (It makes sense when you think about it though;
it implements exceptions with setjmp/longjmp).

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019