Skip to content

Fix worker-thread and linkage crashes#190

Open
estebanzimanyi wants to merge 1 commit into
fix/bump-meos-pinfrom
fix/worker-thread-linkage-crashes
Open

Fix worker-thread and linkage crashes#190
estebanzimanyi wants to merge 1 commit into
fix/bump-meos-pinfrom
fix/worker-thread-linkage-crashes

Conversation

@estebanzimanyi
Copy link
Copy Markdown
Member

Scalar and cast bodies run MEOS on DuckDB TaskScheduler worker threads, which need a per-thread meos_initialize(); a thread-local guard in the scalar exec wrapper and a cast trampoline (RegisterMeosCastFunction) cover every entry point, so timestamp formatting no longer dereferences a NULL session_timezone. Per-type DuckDB callbacks and blob helpers have internal linkage and a single canonical blob round-trip (TemporalToBlob / BlobToTemporal) declared once in temporal/temporal_blob.hpp, so each function-pointer registration binds to its own body.

@estebanzimanyi estebanzimanyi changed the base branch from fix/bump-meos-pin to fix/bump-meos-pin-wasm-pgconfig May 30, 2026 06:29
@estebanzimanyi estebanzimanyi changed the base branch from fix/bump-meos-pin-wasm-pgconfig to fix/bump-meos-pin May 30, 2026 07:00
@estebanzimanyi estebanzimanyi force-pushed the fix/bump-meos-pin branch 4 times, most recently from fa2de57 to 17588c0 Compare June 2, 2026 09:47
Scalar and cast bodies run MEOS on DuckDB TaskScheduler worker threads, which
need a per-thread meos_initialize(); a thread-local guard in the scalar exec
wrapper and a cast trampoline (RegisterMeosCastFunction) cover every entry
point, so timestamp formatting no longer dereferences a NULL session_timezone.
Per-type DuckDB callbacks and blob helpers have internal linkage and a single
canonical blob round-trip (TemporalToBlob / BlobToTemporal) declared once in
temporal/temporal_blob.hpp, so each function-pointer registration binds to its
own body.

(cherry picked from commit 7b99a0c)
@estebanzimanyi estebanzimanyi force-pushed the fix/worker-thread-linkage-crashes branch from 7b99a0c to a33f008 Compare June 2, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant