From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1DDAE39ACC71; Thu, 19 Nov 2020 20:19:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1DDAE39ACC71 From: "simark at simark dot ca" To: gdb-prs@sourceware.org Subject: [Bug gdb/26754] Race condition when resuming threads and one does an exec Date: Thu, 19 Nov 2020 20:19:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: simark at simark dot ca X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2020 20:19:03 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26754 --- Comment #4 from Simon Marchi --- Back when discussing this with Mathieu Desnoyers, he made a prototype patch= to add a ptrace event that sounds very much like what you are describing: https://github.com/compudj/linux-dev/commits/ptrace-event-exec-begin I haven't taken the time to try it yet, but our discussion lead to pretty m= uch the same conclusion as yours. The important thing is that the event happens at a point where we know the = exec is going to go through, at a point of no return (unlike the syscall entry w= ith PTRACE_SYSCALL). --=20 You are receiving this mail because: You are on the CC list for the bug.=