DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 61QLgriE1253228 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 61QLgriE1253228 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=ZaWPG5T6 X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 04B654BA23C6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1772142171; bh=eQX7SYuuidWIQRXMCgi5G9+EC58NpqqVh+rcLtd6MSs=; h=Subject:In-Reply-To:Date:References:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=ZaWPG5T62/Ewywr4ccqlHRdn/mwXwlQxOXhR690d7fId6fQQyIEn54nYWFQGQ3QQM EgsHTU2eai/1x9wNfRQD1ujxD1q/DrR6LHyAP/eicLtSazWbAkemaVFjzcK8Fckzuu SB28leMqvYx6ayDdiekIy0zGKbUg/MQerJ98+yo0= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 559C24BA2E16 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 559C24BA2E16 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772142151; cv=none; b=LnznuTMMcytGmznHezQMv3MTUnUNVTgWvMPDArnFenxGsA3WAX8AI6uXsS2csvxDHR9qo/N+A6Z5aucc0JIZQwix+fckI0ucQ4eSI+sL9M12iADjzkRS9tlutXeidOn6jnEh3kqrcjJz5EwH3CXrwHqDJwEuD4y86otzxqhPd3o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772142151; c=relaxed/simple; bh=hNJcdgljjqsy4s0mzACS5cClFF5NJynMqK6ArpKwM5w=; h=DKIM-Signature:Mime-Version:Subject:From:Date:Message-Id:To; b=UAMTgeTWNzwapJeMxhEJI5XLJi8OmnBzjQyhQlLiOVdrpL5FTqcvHUHXIhStepn90lGorfjTh9gO3AsUdg8u9VPm3hJgdsZ95/e01Jch9JtCt/Cq1jL9qcC9ULcfiZ2NA+435miIc6yJ5Et3+1zPtFitGFsGrXt7eerF1UClwRE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 559C24BA2E16 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772142150; x=1772746950; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=3MgxMm7hLQsHPR4wLnAYJNKz1wQUXcrv5QCUy8iHA4Q=; b=e4cbPPx7mthBkcmEAw3VGyvSObJfbOBoXLkW5wp5FXK1HvhyDzCxCW+gJ//mmATzSL anFETFEscQuxzsnUNIlQmEBisYVXBcDJaMtqH7FpzWLSwxI5YiZiVY/5FmAQr8oR9ovU p6JBAJNkY//adkyKHt4vGtw6iDhuELWzz2gHrfNzHqLrA5+Ht0Sdtbg1FvsvjdGEHAQC 77tulKzcAqJJcnm6ds6Rb3jvYiXSMFIPnroygInJp20Baj/esYm3jJHeynicIGdvP+NC e8wPGBFVyxaWXsOqQ+yo891RSdp0rwAdGu8zI594J5hh+MV10qsKAVRr7/TiPUMapy5f vdjA== X-Forwarded-Encrypted: i=1; AJvYcCWBriPP8gnh91f4Qo+URZKupMG7+pUsdr0njuTyKvzTEsEc+6smL3Yy4wwqu/AaLy3bC6onnyQ=@cygwin.com X-Gm-Message-State: AOJu0YxJyn2znF+cQJ82ynnppMKcGOMc6S75BmE+wu64GIKlk8FsmRrg KeWLQAi5/XPBnepJxeoAkheOL51W7HvGRl+DIDLIWFZbo2QhwC6pF3j+ma8VmD0IyT0= X-Gm-Gg: ATEYQzwiw2f2MPLsw2vhxNsSdbZAEVCh+j29AScmMVfJqvv2Q7j42m+z0ODva9HjRuM p26edUtxYbIouRUywQn5HUaSMN43Ql/aTyfvNH7GKAjt45QUQlBh0o0CPa6pChdDhv3SQ5w5IVl UhspfufWWeB2SbybDoLvbe3khW1UdkNvgjPPq5JXicwCzW4SqZ5FOIi5L2BckKxK+qglJaALC7y WRPdCm9RUGlQqP9WQLDtVqHplSnkPkgRdHxHM/BWho0uDAjAXGAebvhaCRdXo0SHk699ggbEpei 48FFGyXfrJQVdhBYF7Wc+Tl3uwsxGTr+BnCcxClOu0c0f7K7t10TuyqL+lh4fNu+9IHYUHU1kSa lKqN1vOE27WbnD+WKXWKgLL4WD3r1MYeNJwbWK+p8AEqwQvc7bTGTXusipLMSEIfGy8u9KfXwEq cBRsOG59nO6zefHV+TjXurlUIR1nuB1QMfFuEJpuELYZCUn4y0B3bY5dtxHJDtYzME6w== X-Received: by 2002:a17:907:868b:b0:b8e:a024:1c81 with SMTP id a640c23a62f3a-b9376365dc0mr31175066b.7.1772142150074; Thu, 26 Feb 2026 13:42:30 -0800 (PST) Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.4\)) Subject: Re: Memmove causing program crashes, giving SIGTRAP in GDB(?) X-Priority: 3 In-Reply-To: <957583332.1523179.1772138829815@connect.xfinity.com> Date: Thu, 26 Feb 2026 22:42:28 +0100 Message-Id: <6E812632-0E73-464A-AAB9-DC5BC5546B4C@unified-streaming.com> 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> <0C965DD0-856E-41FF-B5A4-15E472292A32 AT unified-streaming DOT com> <483908609 DOT 1508714 DOT 1772103775739 AT connect DOT xfinity DOT com> <2346fd41-2500-0db6-5849-6788174b5a1d AT cs DOT umass DOT edu> <1462848037 DOT 1521935 DOT 1772136952077 AT connect DOT xfinity DOT com> <609655EE-8E9D-4522-A05C-F74C3FC89583 AT unified-streaming DOT com> <957583332 DOT 1523179 DOT 1772138829815 AT connect DOT xfinity DOT com> To: KENNON J CONRAD X-Mailer: Apple Mail (2.3826.700.81.1.4) 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: Dimitry Andric via Cygwin Reply-To: Dimitry Andric Cc: KENNON J CONRAD via Cygwin 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" If such a crash occurs, can you do a "thread apply all bt" in gdb? This will show what all the other threads are doing. I'm betting some other thread is calling memcpy or some other function that is messing with the direction flag. -Dimitry > On 26 Feb 2026, at 21:47, KENNON J CONRAD wrote: > > Yes, lots. 7 threads were running at the point of the crash 87% load on my i7-4790k. I did a little research since the last post. The memmove code where the crash occurs is: > > 0x00007ff96ba812a8 <+136>: std > => 0x00007ff96ba812a9 <+137>: rep movsq %ds:(%rsi),%es:(%rdi) > 0x00007ff96ba812ac <+140>: cld > > This sets the direction flag immediately before the rep movsq and clears the direction flag immediately after the rep movsq. Yet when gdb breaks it shows the direction flag is not set: > > eflags 0x246 [ PF ZF IF ] > > Would a forward move on overlapping data cause the SIGTRAP? Could the code have moved to a different core? Or could it have been interrupted by some other task that corrupts the flag? As I mentioned earlier, the rep movsq is only failing once per several million times memmove is called so it seems likely to be something along those lines. > > -Kennon > > >> On 02/26/2026 12:20 PM PST Dimitry Andric wrote: >> >> >> Is there some concurrency going on? Maybe some other part of the program is flipping the direction flag? >> >> -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