This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]Setup.Exe causes Application Error at 0x78001750

From: "Robert Collins" <>
To: "Pavel Tsekov" <>; <>
Cc: "Seitz, Matt" <>; <>
Sent: Friday, March 22, 2002 20:33
Subject: RE: [Possible BUG and a fix] Re[2]: Setup.Exe causes Application
Error at 0x78001750

> From: Pavel Tsekov []
> Sent: Saturday, March 23, 2002 11:03 AM

>   strcpy (dp, dots);
>   delete[] dots;
>   key = String (dp);
> LOOK HERE - This is not right - we should delete at the base
> of the block, not somewhere in the middle of it.
>   delete[] dp;
> We can do something like that
> char *dp = ....
> char *dp_save = dp;
>  ....
>  delete[] dp_save;

] Huh? delete[]dp; is the last reference to dp. delete[]dots; is the last
] reference to dots. Whats the problem?

dp is modified so doesn't point to the base of the allocated area by the
time delete[] dp is called.  A separate working variable should be used
rather than modifying the allocation pointer.
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter:
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.


2002-03-22  Michael A Chase <>

    * (site_list_type::init): Preserve allocation pointer for key

Attachment: cinstall-mac-020322-1.patch
Description: Binary data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]