Memmove causing program crashes, giving SIGTRAP in GDB(?)

KENNON J CONRAD kennonconrad@comcast.net
Fri Feb 27 18:20:19 GMT 2026


Hello,

   I updated the BIOS to the newest version and ran the code again.  The memmove got SIG_TRAP again.  This time the code was freeing up uint16_t array element 1525 and eliminating array element 1676 by moving elements 1525 - 1675 to elements 1526 - 1676.
RSI contains the address of element 1601, indicating the rep movsq did only 9 iterations before the SIG_TRAP happened.  The ZF shows a value of 0.  So it seems like this is perhaps an OS problem with ZF handling of interrupts.  At this point, it is easiest for me to avoid memmove for backward moves with source/destination overlap because of this problem.  I don't know how many computers are impacted by this problem but I do know it's causing crashes on my test computer and that's enough reason to avoid it.

-Kennon

> On 02/26/2026 7:06 PM PST Eliot Moss <moss@cs.umass.edu> wrote:
> 
>  
> On 2/26/2026 9:04 PM, KENNON J CONRAD wrote:
> > Perhaps something like this?  Maybe I need to try a BIOS update?
> 
> Yes, something *like* these flaws.  The thing is to find out if your specific
> processor has a flaw that needs an update, etc.
> 
> > Intel Haswell (and related architectures) processors may experience stability issues, including machine check errors (MCEs), due to a microcode bug related to REP MOVS (specifically REP MOVSB or REP MOVSQ) handling. These issues often cause system crashes or lockups, leading to microcode, BIOS/UEFI updates to resolve them.
> > Debian Wiki
> >   +4
> > Issue: A high-rate of interrupts or specific memory operations can cause REP MOVS instructions to trigger Machine Check Errors (MCE) or internal errors (IERR) on older processors.
> > Affected Processors: The bug primarily impacts older Intel processors, including Haswell and Broadwell architectures.
> > Fix/Mitigation: The primary solution is to apply the latest motherboard BIOS/UEFI update, which contains the corrected microcode update (often labelled 20180108 or later).
> > Background: This is linked to Intel’s efforts to fix security vulnerabilities (like Spectre), where early patches for Haswell/Broadwell caused unexpected instability, requiring further refinements.
> > Debian Wiki
> >   +4
> > 
> > -Kennon
> 
> EM


More information about the Cygwin mailing list