BUG: Memory Access Violation Uses Repeated Realloc's For Small Bl ocks Q225099 
Author Message
 BUG: Memory Access Violation Uses Repeated Realloc's For Small Bl ocks Q225099

We are experiencing this bug described in  Microsoft's article Q225099.
The fix suggested in this article is to edit ...\vc98\crt\src\realloc.c
and then says (somewhat blithely)  "And rebuild CRT."
But I see no makefile here (or any .dsp).  I do see something called
bldnt.cmd and bld95.bat, but the first just runs nmake, and the second
fails, probably because I've set the environment variable V6TOOLS
incorrectly.
Does anyone have any experience rebuilding the CRT?  ... and think it's
a good idea?  ... have a .mak file?
Why doesn't Microsoft do this for us with the bug fix?  ... or give us
the .mak file?
I'm running with VS6 SP3.

- Jeff

Jeff Spindler
JDA Arthur Product Development
1101 Technology Drive, Ste. 100
Ann Arbor MI  48108
voice: 734.887.4526  fax: 734.887.4555



Tue, 02 Apr 2002 03:00:00 GMT  
 BUG: Memory Access Violation Uses Repeated Realloc's For Small Bl ocks Q225099

Quote:
>The fix suggested in this article is to edit ...\vc98\crt\src\realloc.c
>and then says (somewhat blithely)  "And rebuild CRT."
>But I see no makefile here (or any .dsp).

Jeff,

Try Knowledge Base article Q234622 "PRB: VC++ 6.0 Setup Does Not Copy
the CRT Make Files".

Dave
--
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Fri, 05 Apr 2002 03:00:00 GMT  
 BUG: Memory Access Violation Uses Repeated Realloc's For Small Bl ocks Q225099
Well, to answer part of my own question, the makefiles are on the VS6 CD
volumn 1.  A little hacking is necessary to get them to work if you've
installed into a directory with spaces in the path.

Microsoft support offered the following workarounds:

These make us less queasy than redributing our own CRT!

1.) use _set_sbh_threshold function to avoid/limit the  use of small
block heap. This works fine for Nt4.0 SP4 and Win2000. They have an
efficient windows heap implementation. Will have performance problem in
win9x since win9x heap implementation not that efficient.

2.)The msvcrt.dll shipped with Visul studio service pack 2 has a dual
small block heap implementation. You can use an undocumented environment
variable setting to use the 5.0 compatible heap instead of 6.0
compatible heap. Set the following environment variable:

__MSVCRT_HEAP_SELECT=<fullpath>\<your_exename>.exe,2

Also see Q195009 Application Access Violation or Hang After Applying
SP4. I hope the above workarounds resolves the problem.

Quote:
> -----Original Message-----
> From:      Jeff Spindler
> Posted At: Thursday, October 14, 1999 4:30 PM
> Posted To: language
> Conversation:      BUG: Memory Access Violation Uses Repeated Realloc's For
> Small Blocks  Q225099
> Subject:   BUG: Memory Access Violation Uses Repeated Realloc's For
> Small Blocks  Q225099

> We are experiencing this bug described in  Microsoft's article
> Q225099.  The fix suggested in this article is to edit
> ...\vc98\crt\src\realloc.c and then says (somewhat blithely)  "And
> rebuild CRT."
> But I see no makefile here (or any .dsp).  I do see something called
> bldnt.cmd and bld95.bat, but the first just runs nmake, and the second
> fails, probably because I've set the environment variable V6TOOLS
> incorrectly.
> Does anyone have any experience rebuilding the CRT?  ... and think
> it's a good idea?  ... have a .mak file?
> Why doesn't Microsoft do this for us with the bug fix?  ... or give us
> the .mak file?
> I'm running with VS6 SP3.

> - Jeff

> Jeff Spindler
> JDA Arthur Product Development
> 1101 Technology Drive, Ste. 100
> Ann Arbor MI  48108
> voice: 734.887.4526  fax: 734.887.4555




Sat, 06 Apr 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Making memory blocks smaller with realloc()

2. 'MY HAIRIEST BUG' TALES: REPEATED REQUEST

3. 'MY HAIRIEST BUG' TALES: REPEATED REQUEST

4. Memory access violation using CRecordset and date/time fields

5. Using calloc'ed data in threads causes access violation

6. Access violation in module 'MSVCRTD.dll'

7. Anyway to access Sound Bl

8. VC6 Statement Completion Bug - 2 Access Violations

9. Access violation bug only in release build

10. access violation while use CToolTipCtrl (BUG?)

11. BUG? CPropertySheet.DoModal() Causes Access Violation

12. BUG: Exception causes access violation in std::string::_Tidy

 

 
Powered by phpBB® Forum Software