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: David Allouche
Subject: Re: [Texmacs-dev] Strange bug with C++
Date: Mon, 28 Apr 2003 23:14:59 +0200
User-agent: Mutt/1.5.3i

On Mon, Apr 28, 2003 at 06:50:41PM +0200, Joris van der Hoeven wrote:
> 
> On Mon, 28 Apr 2003, David Allouche wrote:
> >
> >   -- 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?

There are some subtle points with templates regarding the definitions
available at place of instanciation versus place of definition and the
interaction with overload resolution. I do not remember the specifics,
but I lost some hairs on such problems during the gencc transition.

That is just a random guess, do not take it too seriously.


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

Yes, that would be surprising. But the problem you are facing is
itself surprising. Some british private once reportedly said something
like: "once you have ruled out the impossible, the remaining
solution, however improbable, ought to be true".


> > Also, exactly where does the segfault occur?
> 
> During the destruction of ifstream.

Maybe valgrind could be of some help here. There could conceivably be
a memory corruption bug somewhere else which causes a crash in that
destructor but cause no problem otherwise. Yes that is improbable.

-- 
                                                            -- DDAA




reply via email to

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