delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/07/28/05:19:37

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 56S9JbUw4184123
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 56S9JbUw4184123
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=ir9GEyo7
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 020AB385AC2B
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1753694375;
bh=KCRwQKX+bPX0IpOQ8Gr6/ykmsE0q8FRbAtBT7uiH3N8=;
h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=ir9GEyo7V5IUfVFqaOom5hheLCrhQC4JqaP1JPZilTF/6kB0FqVmA3UC5lDrbIpDf
xyeVav+y2V93rfOk2WIzGHFs80LPD8BjQbLEZDu0gZcZnkP3j64ObCxQBr7YBDBhs/
4HgoNhaUHWs1vDCF98bkWMlZ6U7gYINp/thIEaOw=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4BDF13857C7B
Date: Mon, 28 Jul 2025 11:18:35 +0200
To: cygwin AT cygwin DOT com
Subject: Re: new c++ new/delete overloads need wrapping?
Message-ID: <aIdAa3ZMgLKoT4Yh@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <81535510-8360-1c72-442a-0b630a6d937f AT jdrake DOT com>
<aINAAW2oh-EfgP0V AT calimero DOT vinschen DOT de>
<59ba736a-21c7-a004-e5a1-6554df3b58f1 AT jdrake DOT com>
MIME-Version: 1.0
In-Reply-To: <59ba736a-21c7-a004-e5a1-6554df3b58f1@jdrake.com>
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

On Jul 25 10:28, Jeremy Drake via Cygwin wrote:
> On Fri, 25 Jul 2025, Corinna Vinschen via Cygwin wrote:
> > Nevertheless, the code overriding the members in per_process_cxx_malloc
> > is living in the app (_cygwin_crt0_common.cc).  If you just append members
> > to per_process_cxx_malloc nad implement the wrappers in cxx.cc and
> > libstdcxx_wrapper.cc, then old apps using the old _cygwin_crt0_common.cc
> > will just not see the new functions.  So that should work out of the
> > box, shouldn't it?
> 
> I missed a pointer dereference in _cygwin_crt0_common.cc that meant the
> struct was being copied rather than the pointer replaced.  I was concerned
> that a pointer to the old struct might be used, and garbage found in the
> new fields.  I see now that it copies the contents, and if the struct is
> smaller it will obviously leave the new fields alone.
> 
> I came across this comment that concerned me though
>   /* Broken DLLs built against Cygwin versions 1.7.0-49 up to 1.7.0-57
>      [...]
> I don't see the save and restore mentioned in dlopen...  Are these old
> DLLs sufficiently old that there wasn't 64-bit yet, and therefore can't be
> used anymore?

Indeed, the comment is a remnant from our 32 bit past.  Cygwin 1.7.0 was
from 2009, while we merged the 64 bit stuff into the tree in 2013 and
the first official version supporting x86_64 was 1.7.19, I think.


Corinna

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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