[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texmacs-dev] Strange bug with C++
From: |
David Allouche |
Subject: |
Re: [Texmacs-dev] Strange bug with C++ |
Date: |
Mon, 28 Apr 2003 18:25:08 +0200 |
User-agent: |
Mutt/1.5.3i |
On Mon, Apr 28, 2003 at 12:17:42PM +0200, Joris van der Hoeven wrote:
>
> Someone has an idea why the following code yields
> a segmentation fault since more than five years?
> I fixed that by not using fstream at all,
> but that seems a bit ridiculous when using C++...
I dunno what may be causing the problem, but that does not seem to be
the fstream stuff itself.
The attached code (which is essentially the same as yours, using only
standard c++ classes) does not seem to have any problem.
So the remaining suspects I can think of are:
-- The URL stuff. I did not check.
-- A C++ name clash. You could try with a properly namespaced
compiler, like g++-3.2.
-- An optimizer bug. Check w/o optimizations.
-- Some hidden and subtle bug in the base classes. That seems very
unlikely. But maybe you could try separating the problematic code
in a place where it uses only standard c++ classes.
-- A problem with fast_alloc. Seems even more unlikely, but this
does have a impact on how this part of the code is compiled.
There is just a configure option to disable this.
Also, exactly where does the segfault occur? What is the backtrace
provide by gdb in post-mortem mode?
--
-- DDAA
load_string.cc
Description: Text Data