texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] Strange bug with C++


From: Joris van der Hoeven
Subject: Re: [Texmacs-dev] Strange bug with C++
Date: Mon, 28 Apr 2003 18:50:41 +0200 (CEST)

On Mon, 28 Apr 2003, David Allouche wrote:
> 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.

Cannot be.

>   -- A C++ name clash. You could try with a properly namespaced
>      compiler, like g++-3.2.

ifstream is used nowhere else; what could be the name clash?

>   -- An optimizer bug. Check w/o optimizations.

I was already compiling 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.

That would surprise me.

>   -- 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.

Might be, but would be surprising; that would mean that
ifstream does not behave correctly w.r.t. global new/delete.

> Also, exactly where does the segfault occur?

During the destruction of ifstream.

> What is the backtrace provide by gdb in post-mortem mode?

I will take a look when back home again.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]