This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: continuing egcs-1.1 problems


On Fri, 30 Oct 1998, Fred Bacon wrote:

> Okay, this is getting really frustrating.  I've tried several different
> versions of egcs-1.1 packages and have even built my own, but I still get
> a core dump with the following simple program:
> 
> /* -------------------------------- */
> 
> #include <stdio.h>
> #include <netdb.h>
> 
> main()
> {
>    char hostname[65];
>    struct hostent *he = NULL;
> 
>    gethostname( hostname, sizeof(hostname) - 1 );
> 
>    he = gethostbyname(hostname);
> 
>    exit(0);
> }
> 
> /* -------------------------------- */
> 
> This compiles and executes properly with egcs-1.0.2 but core dumps within
> the gethostbyname function when compiled with egcs-1.1b.  Even stranger,
> nearly everything thing else that I've compiled works fine with egcs-1.1
> except the kernel or any program which calls gethostbyname.
> 
> I'm using binutils-2.9.1-1a, and the 1m version of of the glibc packages.
> I've used the -S flag to generate assembly code with both compilers.  Here
> is a partial diff of the two files.  The only substantial difference is at
> the start of main.  The remaining differences are nothing more than the
> version string, label names and comments.
> 
> [bacon@bacon bacon]$diff -u egcs-1.0.2-min.s egcs-1.1b-min.s  
> 
> --- egcs-1.0.2-min.s    Fri Oct 30 22:14:05 1998
> +++ egcs-1.1b-min.s     Fri Oct 30 22:18:50 1998
> 
>  main:
> -       mr 12,1
> -       addi 1,1,-112
> -       stw 12,0(1)
> +       stwu 1,-112(1)
>         mflr 0
>  
> 
> Has anyone else see this?  Could someone with a working egcs-1.1
> installation compile the small code sample above with "gcc -S" and send me
> the output for comparison?  I must be doing something wrong when I build
> the compiler.
> 
> Thanks,
> 
> Fred Bacon

Fred:

	Using gcc from egcs 1.1b your program craps out on me as well.  
This is definitely a bug in egcs 1.1b but I think only for
"powerpc-unknown-linux-gnulibc1" target, because I successfully compiled
and ran the same code with 1.1b in a RS/6000 (rs6000-ibm-aix3.2.5 target)
that I use. Also I am using the egcs 1.1b compiled Mach Kernel right now
and the computer has been up for 12 days so far. I don't even pretend that
I know even a littlebit about powerpc assembly, so I don't have any idea
what's going on. I am crossposting the entire message to egcs mailing
list. Perhaps someone there may be able to shed some light. Could it be
due to a problem in the powerpc implementation of glibc?

regards.
---
Amal Phadke
Department of Ocean Engineering
University of Hawaii at Manoa

e-mail: phadke@kewalo.eng.hawaii.edu (MkLinux DR3)




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]