public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* target/10806: Illegal instruction calling function in shared object on AIX
@ 2003-05-15 18:06 sdowning
  0 siblings, 0 replies; 2+ messages in thread
From: sdowning @ 2003-05-15 18:06 UTC (permalink / raw)
  To: gcc-gnats


>Number:         10806
>Category:       target
>Synopsis:       Illegal instruction calling function in shared object on AIX
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 15 18:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Stuart Downing
>Release:        3.2.2
>Organization:
>Environment:
powerpc-ibm-aix5.1.0.0
>Description:
These modules demonstrate a bug in gcc 3.2.2 on AIX 5.1.

The symptom is an illegal instruction when the foo function is called
when mod.o is converted to a shared object.

I did quite a bit of dividing and conquering from my original code to
get to this result.  I've done some further dividing and conquering
from here to see that the symptom goes away if any of the following
changes are made...

* if static_ptr is not initialized.

* if static_ptr is not static

* if function_static is not static

* if mod.o is not converted to shared (see unshared test)

To demonstrate the symptom run

make

This will build two test programs, one using the non-shared object,
the other using the shared object, then it runs both.

Here's the output from gcc -v for me...
gcc -v
Reading specs from /usr/local/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.2.2/specs
Configured with: ../gcc-3.2.2/configure --disable-nls
Thread model: aix
gcc version 3.2.2

(I downloaded a binary gcc distro from http://aixpdslib.seas.ucla.edu)

Note - I didn't gcc -v -save-temps since the test case is self contained.

Feel free to contact me if you need more details

Stuart Downing
FAME Information Services, Inc.
sdowning at fame dot com
>How-To-Repeat:
unzip, untar and make. 
The shared test program will core dump with an illegal instruction.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-gzip; name="gccbug.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="gccbug.tar.gz"

H4sICMfVwz4AA2djY2J1Zy50YXIA7Vdbb9s2FM5r+CsOggFJikq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TNE8ub1gB6m4XI+pAxij0Cw2l4
vXR5YnHm+kS85LzGU7kvA09gFp3rcmurOpDcDWiF1y05yuBFyY3tqLbwNjRbcnl2fQFXEmPSUN8Z
brheC8YxO64kS8nQlQGra0kbV6IuU5v/zwB+ZvTzP7yi9nTGY+9/pA/v/yKb5m7+55Mszv+nAP9k
uZawVjhYcWTAyelrQoS0/l19cgrkbwKIgeR+a247FMlek8/Y7OP8/6bn/1D/7p/OvnLssfrPx8Xu
/39evHL1P84msf6fAnbb8pK7bHIV21e7q/8F1VjgcPnuHTaEPofwA17cybs3rgmQO70D5T/3G+Hd
5recyl4D5rz+MjV/+x0VHR25dhLr/6nr/7nzLyIiIiIiIiIiIiIiIiIiIiIiImJ/+Afvd24cACgA
AA==


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: target/10806: Illegal instruction calling function in shared object on AIX
@ 2003-05-16 15:26 Stuart F. Downing
  0 siblings, 0 replies; 2+ messages in thread
From: Stuart F. Downing @ 2003-05-16 15:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR target/10806; it has been noted by GNATS.

From: sdowning@fame.com (Stuart F. Downing)
To: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org,
   nobody@gcc.gnu.org
Cc:  
Subject: Re: target/10806: Illegal instruction calling function in shared object on AIX
Date: 16 May 2003 11:19:32 -0400

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10806
 
 I have simplified the test case further.
 Replace mod.c with the following
 
 static char static_thing = 0;
 
 void fun ()
 {
 }
 
 The symptom goes away if 
 
 * the initializer is removed
 * the base type of static_thing is changed to int (but NOT if changed
   to short)
 * the declaration for static_thing is moved after fun
 
 Seems like an alignment problem, but I wasn't able to find any
 switches controlling alignment or initializers to make the symptom go
 away.
 -- 
 Stuart Downing
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-16 15:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-15 18:06 target/10806: Illegal instruction calling function in shared object on AIX sdowning
2003-05-16 15:26 Stuart F. Downing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).