delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2026/02/26/01:48:16

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 61Q6mFH3940029
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 61Q6mFH3940029
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=YN0EeVq6
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0DE8C4BA23CE
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1772088495;
bh=qj06GOO/7jKPfisOu78+bdHfH7u8kpk8IOPV1TjytaU=;
h=Date:To:Cc:Subject:References:In-Reply-To:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
From:Reply-To:From;
b=YN0EeVq6o5Nx9MsdLXF+WDMREz4v8ZE7DbhsL08ayvk0OgdpJApA5yzYbc9eQg6ae
tgg3kqR1aqxlmd0Q9WD531QOz3oG4d7SBUveuSQ4f1+CWKpYfyuvdn94DjxvKd6LK3
iaaLUomnv+R0YVTv4n64anaRZIEHaXNDqMs9EbVI=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 925E44BA23CA
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 925E44BA23CA
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772088475; cv=none;
b=uTmYgPLmA0MrHG2z9WmDag2AZuDWx0XE2IP+4LLvJ/C5mjcA2/HFM1JMQWgeYHmhFoD6Gqe0SfoDuwvfopmz3peRPDU0dqfbCNWSo3+8VFgoVdCbpwOKZulYbrjIR+TwvdDgbXZQdiCJoSsdAk91ftfVpEzaMpHINN+bWAvWK9U=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1772088475; c=relaxed/simple;
bh=5cELe2VnS4FCUMnQZ7D4zIMttHhPrv7Nlsp1XC5/fj0=;
h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;
b=VJn7ZoslI6SDQQhuGTnOBpI5DYCXNCaOnZiOBq43ePRpkor7n/fZAUbdjmMXGPiMngBnVN27Dhu7RUWO/UAs6yDGnoDsbLZuFrdEz9oy9/oGYl6BkiPxtOQIXI+AapTZ47z4hHaulwayAiKWmzSx/l3mzBkv3fgibQ2oRFN8/lc=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 925E44BA23CA
Date: Thu, 26 Feb 2026 01:47:51 -0500
To: KENNON J CONRAD <kennonconrad AT comcast DOT net>
Cc: General Cygwin discussions and problem reports <cygwin AT cygwin DOT com>
Subject: Re: Memmove causing program crashes, giving SIGTRAP in GDB(?)
Message-ID: <aZ_slypcyNMrQYKV@xps13>
References: <547312365 DOT 1464244 DOT 1771958282029 AT connect DOT xfinity DOT com>
<aZ7PrbisVR1R4A7v AT dimstar DOT local DOT net>
<1670201592 DOT 1489273 DOT 1772043520008 AT connect DOT xfinity DOT com>
<e91d8b5b-2690-4271-aa74-e6226440e33d AT SystematicSW DOT ab DOT ca>
<1044918836 DOT 1507810 DOT 1772086967212 AT connect DOT xfinity DOT com>
MIME-Version: 1.0
In-Reply-To: <1044918836.1507810.1772086967212@connect.xfinity.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: Glenn Strauss via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Glenn Strauss <gs-cygwin DOT com AT gluelogic 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 Wed, Feb 25, 2026 at 10:22:47PM -0800, KENNON J CONRAD via Cygwin wrote:
> Hi Brian,
> 
>    I installed the version of the cygwin-debuginfo that is on my test computer to the build machine (version 3.6.6-1).  I put the memmove back in the code in place of the bloated code that has been running the past 4 days without any problem (and the past ~10 years before changing to memset) and got another SIGTRAP in gbd on that memset within 2 hours.  The backtrace looks very similar:

When debugging issues with low-level library calls such as memmove,
I highly suggest testing using reduced compiler optimization settings.

If you can, pull the function in question into a separate .c or .cxx
file, and compile that translation unit with -Os -ggdb.  If you can
reproduce the issue, compile that translation unit with -O0 -ggdb and
try again.

Question: are you replacing old code with memmove() from address x+y to
address x, i.e. shifting left?  Or are replacing existing code with
memmove() and shifting right onto overlapping ranges?  In both cases for
memmove(), the resulting assembly code should detect if the ranges
overlap and should not overwrite existing data before it gets moved.

Cheers, Glenn

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