delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/07/29/14:07:50

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 56TI7oRo863553
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 56TI7oRo863553
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=Guht5T60
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 69F2A3858C2C
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1753812469;
bh=k0EhuIptVtAlXWrb8fwLk5xjSCnNtqucV+RPid3mESo=;
h=Date:To:cc:Subject:In-Reply-To:References:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
From:Reply-To:From;
b=Guht5T60ckkFAqFuV6Ac7A8uieI+Q7a5dy0L0jnnFx7QUcJWuqW0tk0czEPcBzbaA
zgUdgK0KkT6GCXUL3iFjEVx+8AZ6m3GmG/CmCQIgNl/3pEqEctlkLLyq+sYPPWEzr4
fTs33sB4EHIFcJ+u1wburpsDSRTY8MI28F2Yy9VY=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BB1E83858D1E
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BB1E83858D1E
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1753812407; cv=none;
b=YBW3kcvJqE/LW2RMYHngv31fc+yC+Vku2zwFdpGlEI0jFImg5zTOE7/fWxqOXnXYzMl9x/lF7CriKvwsgKhD19q9fB7SDyE0X6v0jiIJmCE4SXmlkApxChxcUtISGiRqQPay4QgqPZj62ytD4oqQRt1jOOjXcLCRuJB55CHZvO8=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1753812407; c=relaxed/simple;
bh=FyAMgZKuL3bEIJ8qzAuiklADwmJD2/vOs4LAQf2oiLc=;
h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;
b=YoUGzLP/+3HSjfJCy0qoOIOqOPolmGTqU5mPfEjlnCB4yBogjshd6r5zkBWyseEzsHqCWUhqIWHFGHUX2TWI7tgJAt0zJJxg4v1VAzfnp/GxnzdZVQG7P7ZjUR4s4IwYvSMF9kfq4DWn/o2Evv2UZZgwmWgE/Y2u3FX8CGOLnHY=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BB1E83858D1E
Date: Tue, 29 Jul 2025 11:06:46 -0700 (PDT)
X-X-Sender: jeremyd AT resin DOT csoft DOT net
To: Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com>
cc: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
Subject: Re: new c++ new/delete overloads need wrapping?
In-Reply-To: <aIiItsyRODNPeqez@calimero.vinschen.de>
Message-ID: <ba3639bf-1286-4a97-583b-42ee7e61cecb@jdrake.com>
References: <81535510-8360-1c72-442a-0b630a6d937f AT jdrake DOT com>
<aINAAW2oh-EfgP0V AT calimero DOT vinschen DOT de>
<d2b0c82b-7390-7efe-789f-8d11120ec12a AT jdrake DOT com>
<aIdBw5iSaIonAPbI AT calimero DOT vinschen DOT de>
<80497791-d323-4204-66ef-4b1a8ff45aa9 AT jdrake DOT com>
<aIiItsyRODNPeqez AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
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: Jeremy Drake via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Jeremy Drake <cygwin AT jdrake 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 Tue, 29 Jul 2025, Corinna Vinschen via Cygwin wrote:

> On Jul 28 12:57, Jeremy Drake via Cygwin wrote:
> > On Mon, 28 Jul 2025, Corinna Vinschen via Cygwin wrote:
> > > Unless there's some automatism referencing the __wrap_X functions even
> > > if the --wrap option isn't present, I don't see this incompatibility as
> > > much of a problem.  We're trying to maintain backward compat, but that
> > > doesn't mean an executable created under  and for a newer Cygwin DLL
> > > has to run under an older DLL.
> >
> > OK, then the patch adds support for wrapping these functions ends up in a
> > stable Cygwin release, then GCC is updated to add additional --wrap
> > parameters for them, and that GCC and binaries it produces will no longer
> > be compatible with older Cygwin DLLs.
>
> *iff* the --wrap option is used with functions not provided by older
> DLLs, right?  Not for some reason generally incompatible, I hope...

Correct.  However, I expect that to be very common for C++ binaries,
because it seems like the C++14 sized delete is now used by default for
ordinary (non-array) delete.

#include <stdio.h>

struct alignas(32) foo {};

int main (void)
{
        char *p = new char (0); // _Znwm
        printf ("%p\n", p);
        delete p; // _ZdlPvm
        foo *bar = new foo; // _ZnwmSt11align_val_t
        printf ("%p\n", bar);
        delete bar; // _ZdlPvmSt11align_val_t

        return 0;
}


-- 
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