Skip to content

add regression tests for GIL ordering bug (v2)#390

Closed
b-long wants to merge 7 commits intomasterfrom
test/issue-370-regression-v2
Closed

add regression tests for GIL ordering bug (v2)#390
b-long wants to merge 7 commits intomasterfrom
test/issue-370-regression-v2

Conversation

@b-long
Copy link
Copy Markdown
Member

@b-long b-long commented May 1, 2026

⚠️ not meant for merge ⚠️

This PR is just meant to try and exercise / demonstrate the issue filed in #370 . It is possible that we will not be able to reproduce.

Summary

Adds TestGilString and expands TestBindCgoPackage/TestBindSimple to exercise the go2py string conversion paths that panic on master without the fix. Intended to run against master to prove the bug is reproducible in CI.

This is an alternate to #389

b-long added 2 commits April 30, 2026 23:37
…no fix

Adds TestGilString and expands TestBindCgoPackage/TestBindSimple to exercise
the go2py string conversion paths that panic on master without the fix.
Intended to run against master to prove the bug is reproducible in CI.
@b-long b-long force-pushed the test/issue-370-regression-v2 branch from 6836d46 to 9683a52 Compare May 1, 2026 20:44
@b-long b-long force-pushed the test/issue-370-regression-v2 branch from 9683a52 to f93fc93 Compare May 1, 2026 20:58
b-long added 2 commits May 1, 2026 21:15
Rebuilds the gilstring example as a minimal two-extension test: gilstring
(Hello) and simple (Add) are each built into the same workdir and imported
in the same Python process, interleaved over 5000 iterations — matching the
exact script from the issue report. Replaces the single-extension approach
that could not trigger the cross-extension GIL/cgo crash.
gopy compiles generated C files in-place via os.Chdir(outputDir), so
building two packages into the same directory caused symbol collisions
(redefinition of gopy_build_bool, GoPyInit, etc.). Each package now
gets its own subdirectory under the shared workdir, mirroring how
extensions coexist under site-packages in a real virtualenv.
@b-long b-long force-pushed the test/issue-370-regression-v2 branch from e521539 to 6599997 Compare May 2, 2026 01:18
@b-long b-long force-pushed the test/issue-370-regression-v2 branch from 6599997 to 8cb89ab Compare May 2, 2026 01:21
@b-long b-long closed this May 2, 2026
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