Bug 77804 - gcc: Internal error: Segmentation fault (program as)
gcc: Internal error: Segmentation fault (program as)
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
8.0
i586 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-11-13 16:08 EST by Need Real Name
Modified: 2007-04-18 12:48 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-02 16:40:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2002-11-13 16:08:06 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823
Netscape/7.0

Description of problem:
When I tried to compile a very simple program to call ipv6 related
functions,including gethostbyname2, gethostbyname2_r, or getipnodebyname,
a problem happened.
You can find what i encountered in the following:

[garros@ipv6 ip6test]$ gcc -o gethostbyname2 gethostbyname2.c
gcc: Internal error: Segmentation fault (program as)
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.


For saving your effort, I have enclosed my simple progam that i tested.
In addition, I used 'gcc version 3.2 20020903' on redhat 8.0 (kernel 2.4.18-4).


How reproducible:
Always

Steps to Reproduce:
1.gcc gethostbyname2.c


Additional info:

# This is gethostbyname2.c
#
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <stdio.h>
 
main(int argc, char **argv)
{
        struct hostent  *hp;
        char *s;
        char dname[40];
 
/*      if((hp=getipnodebyname(argv[1],AF_INET6,0,err_num))==(struct hostent
*)NULL) { */
        if((hp=gethostbyname2(argv[1],AF_INET6))==(struct hostent *)NULL) {
/*      if(gethostbyname2_r(argv[1],AF_INET6,hp,NULL,0,NULL,NULL)==NULL){ */
        fprintf(stderr,"Error occurred.\n");
        exit(1);
        }
        if ((s = strchr(hp->h_name, '.')) != NULL) {
                strcpy(dname,++s);
          }
        fprintf(stdout,"hostname = %s,  domainname = %s\n",hp->h_name,dname);
        fprintf(stderr,"h_addrtype = %d, h_length = %d, h_addr = %s\n",
hp->h_addrtype, hp->h_length, hp->h_addr);
}
Comment 1 Jakub Jelinek 2002-11-13 16:36:57 EST
Cannot reproduce it.
Furthermore, from your error message it is gas, not gcc which segfaults, so
you'd need attach assembly which as is segfaulting on (reproduceably).
Comment 2 Need Real Name 2002-11-14 03:51:11 EST
I hardly understand your comment. Then what is your suggestion or your solution?
What does it mean by "attach assebly"?

by the way, the following tells me that internal error happened in gcc, doesn't it?

++

[garros@ip6 ip6test]$ gcc gethostbyname2.c
gcc: Internal error: Segmentation fault (program as)
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
[garros@ip6 ip6test]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --host=i386-redhat-linux --with-system-zlib --enable-__cxa_atexit
Thread model: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
Comment 3 Michael Lee Yohe 2002-11-14 10:44:37 EST
I have also been unable to reproduce this problem with the source code you
provided.  You might want to run a thorough stress test on your system to ensure
it is not hardware related.  Many gcc faults can be credited to quirky hardware.
 "memtest86" is a good start - http://www.memtest86.com
Comment 4 Jakub Jelinek 2002-11-20 04:40:13 EST
It tells you program as segfaulted and thus gcc driver couldn't build the program.
By attaching assembly I mean that you do:
gcc -S gethostbyname2.c
and attach gethostbyname2.s it creates, provided that running
as -o gethostbyname2.o gethostbyname2.s
segfaults reproduceably.
If not, it is most probably hardware problem.
Comment 5 Jakub Jelinek 2004-10-02 16:40:54 EDT
No feedback, closing.

Note You need to log in before you can comment on or make changes to this bug.