Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,8 @@ dev:
# Full build from scratch: deps → wheel
build: wheel

# Test the built wheel in an isolated venv
test:
rm -rf .test-venv
uv venv .test-venv
source .test-venv/bin/activate.fish
uv pip install dist/arraymorph-0.2.0-*.whl
python3 -c "import arraymorph; print('Plugin:', arraymorph.get_plugin_path()); arraymorph.enable(); print('VOL enabled')"
rm -rf .test-venv

# Full build + test
all: build test
all: build

# Clean build artifacts
clean:
Expand Down
15 changes: 9 additions & 6 deletions lib/include/arraymorph/s3vl/initialize.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ inline herr_t S3VLINITIALIZE::s3VL_initialize_init(hid_t vipl_id) {
// Aws::SDKOptions options; // Changed to use global sdk options for proper
// shutdown
g_sdk_options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Off;
// curl_global_init/cleanup is not re-entrant and must be called exactly once
// per process. Python (or another loaded library) may already own that
// lifecycle. Delegating HTTP init/cleanup to the SDK causes a double-free /
// use-after-free inside Aws::Http::CleanupHttp() at process exit, resulting
// in a SIGSEGV from the HDF5 VOL terminate callback. Disabling SDK-managed
// HTTP init/cleanup avoids the crash while leaving curl usable for the SDK.
// curl and OpenSSL global init/cleanup must be called exactly once per
// process and are not re-entrant. Python (or another loaded library such as
// h5py) may already own those lifecycles. Delegating init/cleanup to the SDK
// causes double-free / use-after-free crashes inside CleanupHttp() and
// CleanupCrypto() when the HDF5 VOL terminate callback fires at process exit,
// after the host process has already torn down those subsystems. Disabling
// SDK-managed init/cleanup for both avoids the crashes while leaving curl and
// OpenSSL usable for the SDK.
g_sdk_options.httpOptions.initAndCleanupCurl = false;
g_sdk_options.cryptoOptions.initAndCleanupOpenSSL = false;
std::set_terminate([]() {
_exit(0);
}); // Shutdown conflicts with Python's interpreter shutdown on macOS.
Expand Down
Loading