Yes, it's confirmed. Just a buffer overflow. Thanks for everyone's help.
Thanks, Philip Bock
----- Original Message -----
From: "Philip Bock" <phil@...>
Sent: Thursday, August 22, 2002 11:47 PM
Subject: Re: [Mingw-users] Error deleting ofstream
> It appears that I made some kind of stupid mistake.
> I have had very little success getting any copy of GDB working, so I've
> all my debugging using cerr, and flushing it after each output. Because I
> use SDL, the output goes to the file stderr.txt. Upon double-checking it,
> seems that the segfault happens not when I delete the ofstream, but on the
> line after that, where I delete a buffer I allocate earlier. I thought I
> pretty careful about figuring out what was going on, and I'm a little
> suspicous of this, because I have in the past encountered segfaults that
> appear to 'wander' from one line of code to another. So I'm not sure. But
> anyway, I decided to comment out the only line of code which accesses this
> buffer, and now I can't reproduce the segfault. So I'll have to go and
> very sure that this line isn't accessing memory outside of the buffer.
> I've already uploaded the file, so I might as well let anyone who wants
> a look. You can download it here:
> http://www.flamewars.org/~phil/Rectangular-0.52-pre-alpha.zip .
> To build it, you will need a copy of the SDL and Lua libraries. I have
> included a binary. To execute it, run the 'cubemove' link, which will just
> give it the right command-line arguments.
> The code in question is in the file source/console.cpp, in the function
> ----- Original Message -----
> From: "Oscar Fuentes" <ofv@...>
> To: <mingw-users@...>; <phil@...>
> Sent: Thursday, August 22, 2002 10:11 PM
> Subject: Re: [Mingw-users] Error deleting ofstream
> > "Philip Bock" <phil@...> writes:
> > > Alright, now I'm confused.
> > >
> > > I just made a minor change to the order of execution of my
> > > code, which shouldn't have had any major effect on this code, and now
> > > segfault is gone. I'm not so happy, because if it goes away just like
> > > it may come back just like that.
> > This could indicate a bug on gcc. You offered to put the code on the
> > net to download. If you still maintain the offer, I would be
> > interested on testing your case.
> > --
> > Oscar
> > -------------------------------------------------------
> > This sf.net email is sponsored by: OSDN - Tired of that same old
> > cell phone? Get a new here for FREE!
> > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> > _______________________________________________
> > MinGW-users mailing list
> > MinGW-users@...
> > You may change your MinGW Account Options or unsubscribe at:
> > https://lists.sourceforge.net/lists/listinfo/mingw-users
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone? Get a new here for FREE!
> MinGW-users mailing list
> You may change your MinGW Account Options or unsubscribe at: