🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by "Douglas C. Schmidt" Sun, 09 Oct 1988 00:27
Short program gets fatal signal on Sun 3's and 4's.
#1485
Author: "Douglas C. Schmidt"
Date: Sun, 09 Oct 1988 00:27
57 lines
1814 bytes
Hi,

  The following program kills g++ 1.27 running on both Sun 3's and
Sun 4's:

----------------------------------------
typedef int ITEM_TYPE;
 
class Binary_Search_Tree {
private:

   friend struct Tree_Node;

   struct Tree_Node {

      ITEM_TYPE  Item;
      char       Tag;
      Tree_Node *Left;
      Tree_Node *Right;

      void * operator new ( long ); 

      Tree_Node ( ITEM_TYPE New_Item ): 
         Item ( New_Item ), Left ( 0 ), Right ( 0 ), Tag ( 0 ) {
      }

   } *Root, *Base;
   
public:

   Binary_Search_Tree ( void );

   ~Binary_Search_Tree ( void );

   int Insert ( ITEM_TYPE Item );

};

inline void * Tree_Node::operator new ( long ) {
   Tree_Node * Temp = Binary_Search_Tree::Base;
   return ( Temp );
}
----------------------------------------

Here's the diagnostic:

g++ version 1.27.0
 echo use .cc filename extension!
use .cc filename extension!
 /usr/public/lib/g++/gcc-cpp+ -v -I/cd/ua/schmidt/include/ -undef
-D__GNU__ -D__GNUG__ -Dsparc -Dsun -Dunix bug.C /tmp/cca12109.cpp GNU
CPP version 1.27.0
 /usr/public/lib/g++/gcc-c++ /tmp/cca12109.cpp -quiet -dumpbase bug.C
-fchar-charconst -noreg -version -o /tmp/cca12109.s GNU C++ version
1.27.0 (sparc) compiled by GNU C version 1.28.  /usr/public/g++:
Program c++ got fatal signal 6.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads