Subject: pkg/15477: sparc64 codegen bug causes problems for Open Motif
To: None <gnats-bugs@gnats.netbsd.org>
From: Lloyd Parkes <lloyd@must-have-coffee.gen.nz>
List: netbsd-bugs
Date: 02/04/2002 15:47:25
>Number: 15477
>Category: pkg
>Synopsis: sparc64 codegen bug causes problems for Open Motif
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Feb 03 19:07:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Lloyd Parkes
>Release: NetBSD 1.5ZA
>Organization:
Must Have Coffee
>Environment:
System: NetBSD archangel.must-have-coffee.gen.nz 1.5ZA NetBSD 1.5ZA (GENERIC.PROF) #0: Wed Dec 26 16:56:07 NZDT 2001 lloyd@archangel.must-have-coffee.gen.nz:/usr/src/sys/arch/sparc64/compile/GENERIC.PROF sparc64
Architecture: sparc64
Machine: sparc64
>Description:
If I find that this compiler bug isn't already in the toolchain PRs, I will
submit it there as well, with the code examples, but without the fix, so that we
have a record of the compiler bug itself, not just the Open Motif workaround.
Open Motif is unable to set the correct string values for label widgets because
of a bug in the gcc 2.95.3 optimiser. Open Motif contains the following two code
fragments
[motif/lib/Xm/Label.c]
... if (lw->label._label == NULL)
{
lw->label._label = XmeGetLocalizedString ((char *) NULL, /* reserved */
(Widget) lw,
XmNlabelString,
lw->core.name);
}
else if (XmeStringIsValid(lw->label._label))
{
lw->label._label= XmStringCopy(lw->label._label);
}
else
{
XmeWarning((Widget) lw, CS_STRING_MESSAGE);
lw->label._label = XmStringCreateLocalized(lw->core.name);
}
[motif/lib/Xm/String.c]
Boolean
XmeStringIsValid(
XmString string )
{
if (string == NULL) return(FALSE);
return(TRUE);
}
Obviously the expected result is
if (_LABEL == NULL)
{
_LABEL = SOMETHING_UGLY_BUT_USEFUL;
}
else if (_LABEL != NULL)
{
_LABEL = COPY (_LABEL);
}
else
{
COMPLAIN_BITTERLY ();
}
The logic that should fall out of this is that COMPLAIN_BITTERLY() is never
reached. If Open Motif is compiled with optimisation switched on, then the Motif
does COMPLAIN_BITTERLY (when it shouldn't). Without optimisation Motif seems to
work (more) correctly.
>How-To-Repeat:
Build Open Motif and then build nedit. Nedit comes up without correct labels on
its menus.
>Fix:
As a workaround for this compiler bug I have patched the created/altered pkg
patches so that 1) Imake.cf can recognise a sparc64 machine, and 2) the
NetBSD.cf file now sets -O0 which causes the default of -O2 to not be used.
This also tidies up one or two inconsistencies in the cf files as well.
A uuencoded bziped tar file follows that contains a replacement for pkg patch
patch-ap and a new patch, patch-as.
begin 644 om.tar.bz2
M0EIH.3%!629365:E?R@`(27_A?XP((#]_________O____X``2````A@&+[P
M]WF^Z]ZWO:G7NQ[S;W.P,#?;IO6[WWV[1JN^O.XX/5]J9MM<[KW>UZ>VGLWV
M.[-9LWUUQ7W8.=W=-O=6YE]@]F#T\$BB3U`TT3&A,!3RF4_4TGZ4WI)ZGJ/U
M0/4TT:#T@T])M0,AZ0`E")@FA`GHC),2>FF2:;2:/4/3*:8F0TT#1H`-#(`:
M9!$!$@C]4]3U'E&-0])IZ(#(:&0#(-``#3$`)-*0@31H$3:2>FH\4\)J>I^I
M/*#R$`#30-!ZAD>H`:!$D@24?DT:I[5/*>F31&R91ID]30TVIHTT```&F@``
M)$A`$#1!H!D31DGH(R:CT:AIZ@T-``T``>H^0\/X\!]Q_QG@(3$0':&_CUND
MO+X1@B1`L1B()T-`D^/MJJOK]F?E.[.![->O]^HZ(FDG^1_#O,8?Y&)_1=T#
M^/L/R0VJJ"C$RG5\UAHSY?F[FZ'`Z";D3@$7)66*/!,0BS`\%3L=!>@9I6$T
M\VSAO/KZ^"38C)!B`6C,%02G#:6Z71UL,"=I5LT&E0G)*0[;5$;I&G[3TPJ\
M\-?Z]KFQU*U3N>[-OEOR46WD<-K1-CR;#/XFW":_7E$]778-U:*J]&-I47G#
MNG0638&*5%%;8Q-[W;[\EQY_/P>3*ZR)5A:+;7L;6]PTHLXNQRV-)ADPBK0M
M?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