From xemacs-m  Wed Jul  2 20:29:20 1997
Received: from mercury.Sun.COM (mercury.Sun.COM [192.9.25.1])
	by xemacs.org (8.8.5/8.8.5) with SMTP id UAA12305
	for <xemacs-beta@xemacs.org>; Wed, 2 Jul 1997 20:29:19 -0500 (CDT)
Received: from Eng.Sun.COM ([129.146.1.25]) by mercury.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id SAA13766 for <xemacs-beta@xemacs.org>; Wed, 2 Jul 1997 18:53:55 -0700
Received: from kindra.eng.sun.com by Eng.Sun.COM (SMI-8.6/SMI-5.3)
	id SAA14213; Wed, 2 Jul 1997 18:28:46 -0700
Received: from xemacs.eng.sun.com by kindra.eng.sun.com (SMI-8.6/SMI-SVR4)
	id SAA18950; Wed, 2 Jul 1997 18:28:45 -0700
Received: by xemacs.eng.sun.com (SMI-8.6/SMI-SVR4)
	id SAA01713; Wed, 2 Jul 1997 18:28:42 -0700
Date: Wed, 2 Jul 1997 18:28:42 -0700
Message-Id: <199707030128.SAA01713@xemacs.eng.sun.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Martin Buchholz <mrb@Eng.Sun.COM>
To: Hrvoje Niksic <hniksic@srce.hr>
Cc: XEmacs Beta Test <xemacs-beta@xemacs.org>
Subject: Repeatable crash with union type
In-Reply-To: <kigk9jfu3w6.fsf@jagor.srce.hr>
References: <kigk9jfu3w6.fsf@jagor.srce.hr>
X-Mailer: VM 6.32 under 20.3 "Sofia" XEmacs  Lucid (beta9)
Reply-To: Martin Buchholz <mrb@Eng.Sun.COM>

>>>>> "Hrv" == Hrvoje Niksic <hniksic@srce.hr> writes:

Hrv> Hmm, I'd like to ask you something, as you work on Sun platforms.  My
Hrv> problem is that I have a very repeatable gc crash after loading
Hrv> modeline.el, on SPARCs with Solaris 2.5 or 2.5.1, when I use union
Hrv> type.  Build like this:

Hrv> ./configure --use-union-type && make

Hrv> There is no way in the hell that I am able to make an xemacs
Hrv> executable.  When I build with optimization, I am sometimes able to
Hrv> get `xemacs', but it usually dies soon.

Hrv> When compiling without union type, everything is fine.

I've added this to configure:

if test "GCC $with_mule $use_union_type" = "yes yes yes"; then
  echo "  WARNING: ---------------------------------------------------------"
  echo "  WARNING: gcc is known to produce buggy code when --with-union-type"
  echo "  WARNING: and --with-mule are enabled.  XEmacs may crash."
  echo "  WARNING: ---------------------------------------------------------"
fi

I've added this to internals.texi:

Use @samp{--with-union-type=yes} occasionally to build XEmacs, for
improved compile-time type checking.  This is not the default, because
it is a little slower, and (more importantly) gcc generates buggy code
that causes XEmacs to crash when the combination @samp{--with-gcc}
@samp{--with-union-type} @samp{--with-mule} is used.  This is not a
problem with other compilers, such as SunPro cc.

Ben sez:

This is a bug in gcc.  Ages ago, Ben flamed the gcc maintainers to get 
it fixed, but they refused, claiming it wasn't a bug.  Ben claims gcc
dies on particularly complex union type assignments, which happen with 
gcc + mule + union-type.

This is the reason why --with-union-type is not the default in XEmacs.

Martin

