delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/07/29/04:30:10

X-Authentication-Warning: smtp3.ihug.com.au: Host p236-apx1.syd.ihug.com.au [203.173.140.236] claimed to be acceleron
Message-ID: <000d01c11806$ff791400$0a02a8c0@acceleron>
From: "Andrew Cottrell" <acottrel AT ihug DOT com DOT au>
To: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Cc: <sandmann AT clio DOT rice DOT edu>, <djgpp-workers AT delorie DOT com>
References: <10107280530 DOT AA16684 AT clio DOT rice DOT edu> <7458-Sat28Jul2001095430+0300-eliz AT is DOT elta DOT co DOT il> <006501c11742$a3fad650$0a02a8c0 AT acceleron> <200107281027 DOT GAA03194 AT delorie DOT com>
Subject: Re: Make 3.791 on Windows 2000 test
Date: Sun, 29 Jul 2001 18:18:05 +1000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Reply-To: djgpp-workers AT delorie DOT com

----- Original Message -----
From: "Eli Zaretskii" <eliz AT delorie DOT com>
> > I modified make's main.c and added the following line, but the crash
still
> > occured and I couldn't see any extra debug info or extra info in the
crash
> > outout attached below. I also just added a printf after I set the
> > malloc_debug level so I can see how many time make is called
re-cursively.
> > This was added at line number 774 in make's main.c befiore the main
function
> > along with a #inlcude <crt0.h>.
> >
> > int _crt0_startup_flags =  _CRT0_FLAG_UNIX_SBRK;
> >
> > This is the output with the crto startup flag set as above and the maloc
> > debug level set to 4. Yet a different crash position.  Have I set the
crt0
> > startup flag correctly?
>
> Yes, I think so.  Charles?

> Note that now it's cc1 which crashes, not Make.  So maybe Charles is
> right, and Unixy sbrk is the solution.  Hmm...  Maybe try building GCC
> with Unixy sbrk and se if that helps (you will have to do that for
> both gcc.exe and cc1.exe).

I seem to have missed something. I have not suceeded in building GCC with
the crt0 startup flag set to use the Unixy sbrk. I tried to build GCC with
the change above in GCC.C and in TOPLEVL.C, and in other files where I found
what looked like a real main() function. This did not work as it appears
that TOPLEVL.O is included in a number of EXE's along with the real main()
function. I then thought that I would manually modify the LIBC startup code
to always effectively set _crt0_startup_flags to  _CRT0_FLAG_UNIX_SBRK, but
I could not find any references for either CRT0_FLAG_UNIX_SBRK or it's
#defined value of 0x0800.

My question is where is _CRT0_FLAG_UNIX_SBRK used in the startup code? This
is so I can modify the startup code to always use it and then I can re-build
GCC and I know that all of the GCC exe's then have the Unixy SBRK set and
re-test.

> Still, I'd like to try to find the problem in `sbrk' with the default
> algorithm.  It's possible we don't handle address wrap-around
> correctly.
>

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019