texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] GCC 3.2 status update


From: Igor V. Kovalenko
Subject: Re: [Texmacs-dev] GCC 3.2 status update
Date: Tue, 12 Nov 2002 01:40:32 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020809

Joris van der Hoeven wrote:
The test described in my previous mail shows the same behaviour, i.e. some tree 
object
must have been deleted more than once.

I'm unable to reproduce this in non-optimized build. Also the bug seems to be 
unrelated
to auto_save (i.e. reproducible without).

Anyone have any ideas?


Well, all this looks very much to what I experienced with g++-3.0 :v(100x(
If a tree gets deleted more than once, then this is probably due to
the compiler (whence an agrravation if you use optimization) and
the same bug is likely to occur at *several* and *random* places
in the code (whence its possible appearance independently from auto-save).
If the bug is really this double-destruction bug, then I see three possible 
fixes:

  1) Finding a way to quickly trace down the routines where objects get
     destroyed twice and make "no-op changes" to the code which make
     the compiler obtemperate. This is only possible if the bugs occurs
     at a few places (this is likely, because many other people would have
     complained otherwise)

  2) Support Hans Boehme's gc. This solves the problem for most pointer
     objects whose destructors would become no-ops. However, there will
     still be some destructors left which should do something. If we are
     unlucky, then this aproach will not eliminate all bugs.

  3) Wait for the g++ guys to do their job.


On PIII-750 unoptimized TeXmacs is rather usable :)


Anyway, everyone using GCC-3.2 should be advised to use GCC-3.2 older than 
20021029
to eliminate a very obscure bug with destructors. Or wait for GCC-3.2.1 which 
should be
released in a couple of weeks.


And which, hopefully, does eliminate this bug :^\=\


Gee, you have a foresight of kind :)
We can possibly eliminate the GCC/c++ PR 8287 which is fixed as of my current 
testing.
More to go, I wish GCC team a luck. IMHO they do a nice job.

Now to the problem update.
As of 20021109 the default optimized compilation does a segfault *immediately*
if not using TeXmacs own memory allocators. Just run and click in the text area.

If using own allocators you are able to invoke Help->Welcome page. Then try to
select first paragraph. When you release mouse button you get *triple* deletion
of tree object after which memory is guaranteed to be corrupted IMO. Well, with 
my
debugging patch there are two deletions of tree object that are reported, 
implying
there was another (the very first) one. 'this' address indicates that tree 
object
was on stack. When after these reports you click somewhere in the text area you 
have
another *two* reports (same diagnostics, same 'this' address) followed by a 
SIGSEGV.


This thing with higher-level optimizations still gets more involved. There is 
even
a bug in compiler causing debugging information to be generated incorrectly...

So... I should admit that main Linux distributions still can accept TeXmacs 
package
along with the requirement to use 'compat'-gcc package and it's libstdc++ 
implementation.
Anyway, Mozilla project seems to have some problems with GCC-3.2. RedHat (to 
name one :)
is shipping Mozilla packages compiled with 'compat'-gcc (2.96) package.

As to my plans regarding this topic, I'm sorry I should be rather busy with my 
PhD for
about a month from now on. Still, I'll find some time to test with GCC-3.2.1 
release :)

--
Regards,
Igor V. Kovalenko    mailto: iko at crec dot mipt dot ru





reply via email to

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