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.

> On 02/26/2026 1:17 AM PST matthew patton <[email protected]> wrote:
> 
>  
> On Wed, Feb 25, 2026 at 11:59:07PM -0800, KENNON J CONRAD via Cygwin wrote:
> > Okay, so now I learned about setting the frame and disassemble and see the 
> > memmove code:
> > 
> > Dump of assembler code for function memmove:
> [snip]
> > => 0x00007ff96ba812a9 <+137>:    rep movsq %ds:(%rsi),%es:(%rdi)
> [snip]
> > End of assembler dump.
> 
> movsq requires address alignment of 8 bytes.
> What are the pointer addresses of the arguments to memmove()?
> A SIGTRAP may result if the addresses are not 8-byte aligned.
> 
> 
> 767 * 2 / 8 and 2633 * 2 / 8 would seem to violate that rule.

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

Reply via email to