Subject: Problem with libstdc++ / Sparc
To: None <current-users@NetBSD.ORG>
From: Juergen Hannken-Illjes <hannken@serv1.eis.cs.tu-bs.de>
List: current-users
Date: 01/28/1997 13:51:30
While trying to run the following program (-current, sparc) I get a SIGBUS:

test.cc::
#include <strstream.h>

main()
{
  ostrstream os;

  os << "File";
}

If I change src/gnu/lib/libg++/libio/strfile.h as follows

--- strfile.h   1996/12/22 12:09:48     1.1.1.2
+++ strfile.h   1997/01/28 12:46:47
@@ -41,5 +41,5 @@
   struct _IO_FILE _f;
   const void *_vtable;
-  struct _IO_str_fields _s;
+  struct _IO_str_fields _s __attribute__ ((aligned(8)));
 } _IO_strfile;

the problem goes away.

The same program runs fine on i386.

-- 
Juergen Hannken-Illjes - hannken@eis.cs.tu-bs.de - TU Braunschweig (W Germany)