[DynInst_API:] [dyninst/dyninst] 7c7225: Define _REENTRANT when OpenMP is enabled to fix Cl...


Date: Thu, 02 Jul 2026 17:33:00 -0700
From: bbiiggppiigg <noreply@xxxxxxxxxx>
Subject: [DynInst_API:] [dyninst/dyninst] 7c7225: Define _REENTRANT when OpenMP is enabled to fix Cl...
  Branch: refs/heads/bbiiggppiigg/fix-clang-openmp-reentrant
  Home:   https://github.com/dyninst/dyninst
  Commit: 7c72251e4bf5fd96531c29711367150b32a425f1
      https://github.com/dyninst/dyninst/commit/7c72251e4bf5fd96531c29711367150b32a425f1
  Author: wuxx1279 <bbiiggppiigg@xxxxxxxxx>
  Date:   2026-07-02 (Thu, 02 Jul 2026)

  Changed paths:
    M cmake/tpls/DyninstOpenMP.cmake

  Log Message:
  -----------
  Define _REENTRANT when OpenMP is enabled to fix Clang thread-safety

Dyninst's bundled Sawyer/ROSE only compiles its pool allocator and
shared-pointer reference counting as thread-safe when _REENTRANT is
defined (dataflowAPI/rose/util/Sawyer.h). GCC's -fopenmp defines
_REENTRANT implicitly, but Clang's -fopenmp/-fopenmp=libomp does not,
so Clang builds ran the OpenMP-parallel parser with no-op allocator
locks. This corrupted the pool free list and SValue reference counts,
causing assertion failures and segfaults during parallel jump-table
symbolic evaluation (only reproducible with >1 OpenMP thread).

Define _REENTRANT globally when USE_OpenMP is set, matching GCC's
behavior and keeping the setting consistent across all translation
units to avoid ODR mismatches in Sawyer's shared-object layout.

Co-Authored-By: Claude Opus 4.8 <noreply@xxxxxxxxxxxxx>



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] 7c7225: Define _REENTRANT when OpenMP is enabled to fix Cl..., bbiiggppiigg <=