Subject: Re: Bizarre g++ behavior on sparc
To: Aaron Brown <abrown@eecs.harvard.edu>
From: Andrew Gillham <gillhaa@ghost.whirlpool.com>
List: port-sparc
Date: 05/01/1996 23:57:10
Aaron Brown writes:
> 
> Has anyone had trouble with g++ on the sparc port (specifically the Sun4m)
> or any other port recently? This simple program:
> 
[...]
> 
> segfaults when run. (test is non-empty). I built libg++ and libstdc++ with
> debugging symbols, and as far as I can tell, the "this" pointer is getting
> trashed somewhere inside istream::get(). It starts out as a nice stack
> address (0xf7fff548 or something) and then turns into 0x4000xxxx by the
> time it gets to ipfx1 inside istream::get(). 

This program runs fine for me on: (Sparc LX, sun4m)
NetBSD logrus 1.1B NetBSD 1.1B (LOGRUS) #1: Mon Apr 29 15:26:21 EDT 1996     gillhaa@logrus:/usr/src/sys/arch/sparc/compile/LOGRUS sparc

> This program runs on NetBSD-1.1/i386 just fine. Has anyone seen similar
> strange behavior and/or can anyone else reproduce this? (I'm trying to
> find out if it is in some bizarre way a sun4m port bug). This is with the
> most current libg++/g++/gcc/libc/etc (all built yesterday).

Hmm, maybe *I* am being clueless, but does the new 'make includes' stuff
actually install the g++ headers correctly?  I ended up having to manually
copy the iostream.h/fstream.h (and dependancies) to /usr/include/g++.
Maybe you don't have the latest headers installed?

-Andrew