DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 61QAog2u1037712 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 61QAog2u1037712 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=BUDUItcd X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 842944B9DB57 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1772103041; bh=ib3Gk4x6sSoz2v6qY4jidGmsEWEqz6InLNmn/ra1+JQ=; 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=BUDUItcdOu7qnJ6VVV4Sucnxy/GP2F82l2qrwyUCisln3nESxjSw/88PiZsID2isH mj9m1vTX34KFaMdbaYuM2OJfvx7dVMTdMePA0ATKpqFWqCeCkvYi8h6L7rx4EB5T6f MZ/eCLFy1tmDIWaZXk6wCxseeQNsrEfQSXt7u/6g= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 324624BA2E0B ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 324624BA2E0B ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772102993; cv=none; b=al2xSS9L1lQ29PtwZ19svEBP6owwgGS9HXbFJXIXZ3Ki0h0YMHfZWmvb+XWhkpjsi+MsH99Xbq6jE19MUs0tqDvuWcCwBShN9GZ90+lcnagKtoGDWDHM64TH9N+Xw7SOepe2DINYh/d0biboGjw/aqKz1NtcfnXMZEr7aRH2p14= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772102993; c=relaxed/simple; bh=3e9XViDK9Mbxq23zIYBvUFDD0csmQB2NHvnU9A4VhyY=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=khOvhcv1dJ/yRCV1eUDgPs1l/QlxetxDPb9z3hbK8CxOJEUj0BFI3iR9unglOrC0f0KcYfz8OCQNcBXgw/1LY4xIFX2Llc+rQLCzDCkFWOx+xP0Kw5Xol+aH1Ld5Y6PE66vkhoxk5gjrqfd+/A5/jWvLfJS8jLq3xzimot4RRP0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 324624BA2E0B Date: Thu, 26 Feb 2026 05:49:50 -0500 To: KENNON J CONRAD Cc: KENNON J CONRAD via Cygwin Subject: Re: Memmove causing program crashes, giving SIGTRAP in GDB(?) Message-ID: References: <547312365 DOT 1464244 DOT 1771958282029 AT connect DOT xfinity DOT com> <1670201592 DOT 1489273 DOT 1772043520008 AT connect DOT xfinity DOT com> <1044918836 DOT 1507810 DOT 1772086967212 AT connect DOT xfinity DOT com> <1579472684 DOT 1508349 DOT 1772092747339 AT connect DOT xfinity DOT com> <1148572549 DOT 1808180 DOT 1772097444036 AT mail DOT yahoo DOT com> <1901597260 DOT 1508573 DOT 1772100378936 AT connect DOT xfinity DOT com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1901597260.1508573.1772100378936@connect.xfinity.com> X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Glenn Strauss via Cygwin Reply-To: Glenn Strauss Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On Thu, Feb 26, 2026 at 02:06:18AM -0800, KENNON J CONRAD wrote: > Yes, movsq requires addess alignment. Memmove however is not supposed to require alignment as it should work for chars, ints, etc. It should handle alignment requirements before calling movsq. That is something I want to verify. Yes, this should be handled by memmove(), but I encourage verification of assumptions. If the code is supposed to be aligned due to default natural alignment, inlining of memmove() might optimize on that information (although it shouldn't if you compile -O0) If sanitizer is available, you can try compiling with -fsanitize=alignment 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