[DynInst_API:] [dyninst/dyninst] df5ffb: Add proccontrol support for threads spawned before...


Date: Thu, 05 Feb 2026 10:39:08 -0800
From: Tim Haines <noreply@xxxxxxxxxx>
Subject: [DynInst_API:] [dyninst/dyninst] df5ffb: Add proccontrol support for threads spawned before...
  Branch: refs/heads/master
  Home:   https://github.com/dyninst/dyninst
  Commit: df5ffba700fe21ce3139ba822f8c5baab4c8ae97
      https://github.com/dyninst/dyninst/commit/df5ffba700fe21ce3139ba822f8c5baab4c8ae97
  Author: Tim Haines <thaines.astro@xxxxxxxxx>
  Date:   2026-02-05 (Thu, 05 Feb 2026)

  Changed paths:
    M dyninstAPI/src/dynProcess.C
    M dyninstAPI/src/pcEventHandler.C
    M proccontrol/src/event.C
    M proccontrol/src/handler.C

  Log Message:
  -----------
  Add proccontrol support for threads spawned before reaching main (#2131)

* Use a synchronized breakpoint for 'main'

If a thread is spawned before reaching main (e.g., in a .ctor entry),
proccontrol does not observe events from it and so assumes it is safe
to remove the breakpoint at 'main'. It is unclear at this time why no
events are observed. Particularly becuase there is a check that _should_
catch this case:

  BPatch::processCreate
          V
  BPatch_process::BPatch_process
          V
  PCProcess::createProcess
          V
  Process::createProcess
          V
  int_process::createProcess
          V
  PCProcess::bootstrapProcess()
          V
  assert( pcProc_->allThreadsStopped() );

co-authored by Kian Cossettini @ AMD

* Ignore events for destroyed threads launched before main

If a thread is launched and destroyed before main is reached, there
could be events in the queue that belong to that dead thread. We should
ignore them. This seems at odds with proccontrol's failure to detect
that there are threads alive before main is reached, but there is a
user-reported crash that is fixed by these changes.

Co-authored-by: Kian Cossettini <Kian.Cossettini@xxxxxxx>



To unsubscribe from these emails, change your notification settings at https://github.com/dyninst/dyninst/settings/notifications
[← Prev in Thread] Current Thread [Next in Thread→]
  • [DynInst_API:] [dyninst/dyninst] df5ffb: Add proccontrol support for threads spawned before..., Tim Haines <=