Bug 312733

Summary: [libpas] Fix libpas standalone build
Product: WebKit Reporter: zak ridouh <zakr>
Component: New BugsAssignee: zak ridouh <zakr>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

zak ridouh
Reported 2026-04-19 18:07:51 PDT
311133@main removed includes from headers whose macro bodies are guarded by PAS_ENABLE_ISO / PAS_ENABLE_HOTBIT. These macros are 0 in WebKit (PAS_BMALLOC=1) but 1 in the libpas standalone build, so the includes were silently required by the standalone build. Restore them inside the #if PAS_ENABLE_* guards so WebKit keeps the build-speed win. Also fix several pre-existing issues that surface once the standalone build gets past the include errors: - Guard <stdatomic.h> in pas_utils.h for C-only. It conflicts with C++ <atomic> before C++23 and breaks Verifier.cpp. The macros that use atomics (PAS_ATOMIC_TYPE / PAS_ATOMIC_LOAD_RELAXED) only use the _Atomic keyword and __c11_atomic_* clang builtins, neither of which needs the header. - Restore <pthread/tsd_private.h> in pas_utils.h. TSDTests.cpp and pas_fast_tls.h depend on pthread_key_init_np, _pthread_setspecific_direct, and __PTK_FRAMEWORK_* keys from it. - Add missing bmalloc_iso_allocate_array_by_size and bmalloc_try_iso_allocate_array_by_size definitions to bmalloc_heap_iso.c. They're declared in bmalloc_heap.h but were lost in db6887c9076e when bmalloc_heap.c was split. - Add 'static' to the 9 PAS_ALWAYS_INLINE functions in pas_mte.h. C99 inline semantics require an external definition when the compiler chooses not to inline (which happens in Debug, where PAS_ALWAYS_INLINE drops __attribute__((always_inline))). The codebase convention is 'static PAS_ALWAYS_INLINE' for header-only inline functions (489 occurrences across 87 files); the pas_mte.h functions are anomalies.
Attachments
Radar WebKit Bug Importer
Comment 1 2026-04-19 18:07:57 PDT
zak ridouh
Comment 2 2026-04-19 18:12:42 PDT
EWS
Comment 3 2026-04-22 07:04:48 PDT
Committed 311770@main (d7b3180cbfe8): <https://commits.webkit.org/311770@main> Reviewed commits have been landed. Closing PR #63084 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.