Subject: Re: Bizarre g++ behavior on sparc
To: None <abrown@eecs.harvard.edu>
From: David S. Miller <davem@caip.rutgers.edu>
List: current-users
Date: 05/01/1996 22:50:08
   Date: Wed, 01 May 1996 19:48:19 -0400
   From: Aaron Brown <abrown@eecs.harvard.edu>

   Has anyone had trouble with g++ on the sparc port (specifically the Sun4m)
   or any other port recently? This simple program:

For stuff like this I suggest getting a complete instruction trace
using Gordan Irlams SPA suite.

spy -d bug my_program

will dump a huge file called bug_* where "*" is a unique number and
the name of my_program as a postfix.  The format of the file is:

struct spy_entry {
    char exec_type;
    char data_addr_valid;
    short trap_number;
    unsigned long opcode;
    unsigned long inst_addr;
    unsigned long data_addr;
};

for each instruction the program executes.  You should be able to
easily see why the program is eating so much stack, caution though
this program makes _big_ log files.  Source can be found at

vger.rutgers.edu:/pub/linux/Sparc/spa/spa-1.0.tar.Z

The stuff in SPA is great for tracking down all kinds of kernel bugs,
especially ones which just spam the processes address space somehow
and only leave you clues long after the damage has been done
(ie. things like not setting a page dirty etc.)

Later,
David S. Miller
davem@caip.rutgers.edu