This is the mail archive of the email@example.com
mailing list for the Cygwin project. See the Cygwin
home page for more information.
Re: (patch) reg_key copy construction bug
- To: Mumit Khan <firstname.lastname@example.org.EDU>
- Subject: Re: (patch) reg_key copy construction bug
- From: Chris Faylor <email@example.com>
- Date: Thu, 29 Apr 1999 17:20:18 -0400
- Cc: firstname.lastname@example.org
- References: <199904292008.PAA23228@modi.xraylith.wisc.edu>
I have to note that my cygwin1.dll is not crashing on startup, however.
That is not new code, is it? Hasn't it been there for years/
On Thu, Apr 29, 1999 at 03:08:36PM -0500, Mumit Khan wrote:
>The following fix is hopefully obvious. Think of what happens when you
>pass a copy of a (open) reg_key to a function -- it calls the destructor
>on the way back, and so the does the original and RegClose crashes trying.
>The current implementation of reg_key is dangerous in that it blindly
>allows a copy construction; it should really disable copying by using
>a private copy. However that'll break the subkey generation, so it'll
>take a bit of rework.
>The current code should always crash in mount_info::from_registry ()
>when Cygwin1.dll starts up.