[alt.sys.sun] Sun Modula-2 Dynamic Linking Problem

nagler@olsen.UUCP (Rob Nagler) (03/08/91)

Config: SunM2 2.2, SunOS 4.1, SS1+

Problem: 
Every now and then dynamically linked Modula-2 programs crash.
When the programs are linked with -Bstatic, the programs don't 
crash.  Specifically, we run huge recursive makes and in those 
makes we run a preprocessor hundreds on times.  During one of 
these makes, the preprocessor will crash maybe twice.  Since we 
have linked -Bstatic, there haven't been any crashes.

The core dumps are strange (looks like the stack gets totally trashed).
There is a huge hole in the core and the stack traces never end. 
Here's some data:

	% m2pp -DBigEndian...
	*** Trace/BPT trap - core dumped
	% ls -sl core
	88 -rw-r--r--  1 software  8430000 Nov 11 15:15 core
    	% adb /ox/commands/language/modula2/m2pp/sun/bin
	core file = core -- program ``m2pp''
	SIGIOT 6: abort
	_kill(?)
	_ProgErr$DumpCore$8(0x2,0x32800,0x2,0x1,0x0,0x1) + 8
	_ProgErr$DoTerminate$7(0x1,0xff186000,0xff135988,0xff184610,0xff11d578,0x0) + a8
	_ProgErr$RunTimeHandler$5(0x8,0xf8239000,0x70f,0xf8128cc4,0xf7766274,0xf000) + 1
	_SYSTEM$Modula2Trap(?)
	_SYSTEM$pcopy(0x8,0x80000,0xf8128cc4,0xf8128cc4,0x33,0xf8128cc4) + 1c
	_SYSTEM$pcopy(?)
	__DYNAMIC(0x0) + 4c
	_ProgErrOutput$WriteString(?)
	__DYNAMIC(0x0) + 4c
	_ProgErrOutput$WriteString(?)
	.... The stack repeats infinitely (up 2000000 didn't get to the top)
      
I've submitted this to the vendor, but not directly to Sun (no maintenance
contract).   We don't really need dynamic linking, but it would sure save
some disk space.  Thanks for any help.

Rob nagler@olsen.ch