ARGH!! Segfalts in gpc-970714

Tue, 15 Jul 1997 16:32:16 +0000


This is a multi-part message in MIME format.

--------------2A281EF664B3
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Ok, this could very easily be something I've done (I had to make a
slight chage to gpi-hash.c to get gpc to link for djgpp (patch
attached)) but I get segmentation/page faults for the attached code
whenever ANY ONE of the commented out sections of code are uncommented.
(Yes, it's the same file as before, just trimmed down for the segfaults)

Oh, and I had to rename rts-conf.h to rts-config.h and rts-vers.c to
rts-version.c to build libgpc.a.

I'll try rebuilding gpc/gcc from scratch to see if that helps.

Ug, this is frustrating.

Bill
-- 
Leave others their otherness.

--------------2A281EF664B3
Content-Type: text/plain; charset=us-ascii; name="o"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="o"

*** gpi-hash.c.~	Mon Jul  7 21:44:56 1997
--- gpi-hash.c	Tue Jul 15 15:44:22 1997
***************
*** 49,55 ****
  #endif
  
  
! extern unsigned long _end;
  
  /* integer type for void * representative */ 
  #define IRP_TYPE long
--- 49,59 ----
  #endif
  
  
! extern unsigned long _end
! #ifdef __DJGPP__
! __asm__("end")
! #endif
! ;
  
  /* integer type for void * representative */ 
  #define IRP_TYPE long

--------------2A281EF664B3
Content-Type: text/plain; charset=us-ascii; name="foo.pas"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="foo.pas"

unit foo;
interface
type wrkstring=string[255];
function DecToBin( DecInput : string ) : wrkstring;
implementation

function DecToBin{( DecInput : string ) : wrkstring};

{ converts a decimal string[ up to 256 ] into binary string }

var
   TempStr : wrkstring;
   DecNum,
   Mask    : word;
   Pos     : byte;
   Err     : integer;

begin
(*  TempStr := '';*)
  mask    := $8000;
(*  ReadStr(DecInput,DecNum);*)
  for Pos := 1 to 16 do begin
    (*if (mask and DecNum) > 0 then*)
      mask := mask;
(*    if (mask and DecNum) > 0 then
	  TempStr := TempStr + '1'
    else TempStr := TempStr + '0';
      mask := mask div 2;*)
  end;
(*  while (TempStr[1] = '0') and (length(TempStr) > 1) do  { returns at least 0}
    delete(TempStr,1,1);*)
  DecToBin := TempStr;
end;

end.

--------------2A281EF664B3--


Bill Currie (billc@blackmagic.tait.co.nz)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es