delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2026/02/26/06:03:49

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 61QB3mA01045781
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 61QB3mA01045781
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=tL1YMJu1
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 15B124BA23CE
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1772103828;
bh=ZQlpbr0w54UZuevHoluxx9/hh8Xoyi6FEPWqIZLlWg4=;
h=Date:To:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=tL1YMJu1DvSiJ1OT8qnF/V6KsQwLIlhGzB7l5YigEKaPx21+y/EmUo2EmrivqP8+m
/jsNj1eS+BtBet/fwjN00o4tzfDFFlK4/zzMCPa7gNOTKICsRmbuNnGCxHUcRqlyLw
Bj3/yPeF7mD4POY5KrQGxNzmpqCfjv5V/e9Y1X7k=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A25E74BA2E0B
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A25E74BA2E0B
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772103777; cv=none;
b=heHYAAE/jU7CzhBBGU7n/szg5xpWLExPAeSgE2/qk91sDjNvzaYhm+Y8rf1DATGEa8wSe4q4LKbT6Ts5dMQZEOA1yX7xXkWlJfsxeoBTKnu20Otct/69W4kuHiC9HV1LEeQunUauvnhSHu4hMKFE9GpNJ+Za1a8osc4PJHoN+WI=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1772103777; c=relaxed/simple;
bh=3gdLuJoHHRq93C0/qP8uEbvgc2vyW8V62J/QOs3fdcs=;
h=DKIM-Signature:Date:From:To:Message-ID:Subject:MIME-Version;
b=jVS2pvO4W8zONbWq8s0Kup86xRegjr9UX8oLK7lI+frrOdGzR/PUkOWvdqLVd7zJNCK9kdx78lV/EAk9SFvATN+c5yIBU+ySWgy4NFvMHNsm9USIBIEDCObOtyQR4jM6yEQW3zbXtw+yfeEtTzo0KlreSV9zKk/tONwu0fxNrdc=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A25E74BA2E0B
Date: Thu, 26 Feb 2026 03:02:55 -0800 (PST)
To: Dimitry Andric <dimitry AT unified-streaming DOT com>
Message-ID: <483908609.1508714.1772103775739@connect.xfinity.com>
In-Reply-To: <0C965DD0-856E-41FF-B5A4-15E472292A32@unified-streaming.com>
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>
<1579472684 DOT 1508349 DOT 1772092747339 AT connect DOT xfinity DOT com>
<aaABFf5iEowV1l7I AT xps13>
<1148572549 DOT 1808180 DOT 1772097444036 AT mail DOT yahoo DOT com>
<1901597260 DOT 1508573 DOT 1772100378936 AT connect DOT xfinity DOT com>
<0C965DD0-856E-41FF-B5A4-15E472292A32 AT unified-streaming DOT com>
Subject: Re: Memmove causing program crashes, giving SIGTRAP in GDB(?)
MIME-Version: 1.0
X-Priority: 3
Importance: Normal
X-Mailer: Open-Xchange Mailer v7.10.6-Rev83
X-Originating-IP: ::ffff:50.47.202.14
X-Originating-Port: 25112
X-Originating-Client: open-xchange-appsuite
X-CMAE-Envelope: MS4xfBrNXmrNO7kDOlNQFpFRKJ0lafBI+bD+Jw47qZ/NLwC/XWRVpwXsGUyvvOj7UDseF46OBvYnPeqYXGSyZUMqaxB6hvn04nGCt/wO3WedaS4+vhx+b+Lp
5mhnMwJzkLsjPUsJTSZAG3kRJhsWU3l3JWv+fX72lu6qyk/GYaVtzhzQXAT8E40xjidHY7T426oLgKLnmlsegh9wfksOPV5VRcwhxbstAgj4j4PtpG3fF1os
mLnuGbhHg/B7/e3Uep9G0XkTZZzegpeW31YOQ1zF8BX+OHRiqAQ05MV+3eYF0Cgkx6B186S9VujQiYmEJMw3/b2HGoQgnmMmZn0DXso9Iqc=
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: KENNON J CONRAD via Cygwin <cygwin AT cygwin DOT com>
Reply-To: KENNON J CONRAD <kennonconrad AT comcast DOT net>
Cc: KENNON J CONRAD via Cygwin <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>

Thanks for checking and sharing your thoughts.  This is what I would expect, so at least I'm not crazy :)
I really need to see the values of the registers in memmove, hopefully it's just a matter of continuing to learn gdb.

Appreciate it!

Regards,

Kennon

> On 02/26/2026 2:50 AM PST Dimitry Andric <dimitry AT unified-streaming DOT com> wrote:
> 
>  
> Most memcpy/memmove implementations consist of an initial part that copies/moves any number of leading unaligned bytes, if necessary, followed by a main loop that copies/movies the bulk as words (32 or 64 bit depending on the architecture), and finally a part that copies/moves any number of tailing unaligned bytes.
> 
> The implementation you showed in assembly does just that. The main loop will use instructions that are supposed to only be used on aligned memory, but since the leader and trailer are handled separately, you should never run into an alignment exception at that point. My guess is that there is some sort of buffer overrun instead. If the overrun stays within a memory page, you won't notice it, but unrelated data will have been clobbered. However, if the overrun goes over a page boundary, you will get a page fault.
> 
> -Dimitry
>

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