public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: sdowning@fame.com
To: gcc-gnats@gcc.gnu.org
Subject: target/10806: Illegal instruction calling function in shared object on AIX
Date: Thu, 15 May 2003 18:06:00 -0000	[thread overview]
Message-ID: <20030515180407.18659.qmail@sources.redhat.com> (raw)


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

H4sICMfVwz4AA2djY2J1Zy50YXIA7Vdbb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H8flQYtQR8McljO/glMXTNE8ub1gB6m4XI+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==


             reply	other threads:[~2003-05-15 18:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-15 18:06 sdowning [this message]
2003-05-16 15:26 Stuart F. Downing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030515180407.18659.qmail@sources.redhat.com \
    --to=sdowning@fame.com \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).