Skip to content

[v6.0.x] pmix/base: remove the unused evbase field#14182

Merged
hppritcha merged 1 commit into
v6.0.xfrom
backport/pr-14176-to-v6.0.x
Jul 21, 2026
Merged

[v6.0.x] pmix/base: remove the unused evbase field#14182
hppritcha merged 1 commit into
v6.0.xfrom
backport/pr-14176-to-v6.0.x

Conversation

@ompi-backport-bot

Copy link
Copy Markdown

Backport of #14176 to v6.0.x.


opal_pmix_base.evbase was write-only: initialized to NULL, set to opal_sync_event_base in the framework's open function, and never read or freed by anything in the tree. Remove the field and the assignment.

Dead as it is, it is exactly the shape of pointer that produced the teardown bugs being fixed in #14164: a long-lived copy of OPAL's shared event base parked in a component's global state. opal_event_finalize() frees that base, so any such copy is dangling for the remainder of teardown, and any code that later grows a use of it inherits a use-after-free. Removing the trap is cheaper than auditing it forever.

Split out of #14164 (where earlier revisions of this change were reviewed) since it is independent of the event-base lifetime fix there. Compile-validated on macOS (clang, Apple Silicon) and AlmaLinux 10 (gcc 14, arm64) as part of that PR's full make check runs.

opal_pmix_base.evbase was write-only: it was initialized to NULL and
then set to opal_sync_event_base in the framework's open function, and
nothing in the tree ever read it or freed it.

Dead as it is, it is exactly the shape of a bug we just had to fix in
the tcp btl: a long-lived copy of OPAL's shared event base, squirreled
away in a component's global state.  opal_event_finalize() frees that
base and NULLs opal_sync_event_base, so any such copy is a dangling
pointer for the remainder of teardown, and any code that later grows a
use of it -- to register an event, or worse, to free it -- inherits a
use-after-free or a double free.

Remove the field rather than leave the trap sitting there.

Signed-off-by: Jeff Squyres <jeff@squyres.com>
(cherry picked from commit ba916b4)
@ompi-backport-bot ompi-backport-bot Bot added the target:v6.0.x Backport targeting the v6.0.x branch label Jul 20, 2026
@github-actions github-actions Bot added this to the v6.0.0 milestone Jul 20, 2026
@hppritcha
hppritcha merged commit 4e63542 into v6.0.x Jul 21, 2026
17 checks passed
@hppritcha
hppritcha deleted the backport/pr-14176-to-v6.0.x branch July 21, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Target: v6.0.x target:v6.0.x Backport targeting the v6.0.x branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants