indygreg / indygreg/PyOxidizer
pyembed: BUG: SIGSEGV in safe code
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 256
- PR merge metrics
- No merged PRs in 30d
Description
#344 adds a test for the bug that this issue tracks: a segmentation fault coming from safe code:
```rust
let py = {
let mut config = pyembed::OxidizedPythonInterpreterConfig::default();
config.interpreter_config.parse_argv = Some(false);
config.set_missing_path_configuration = false;
let mut interp = pyembed::MainPythonInterpreter::new(config).unwrap();
interp.acquire_gil().unwrap()
};
py.import("sys").unwrap();
```
I would expect lifetime bounds to prevent this from compiling.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the regression test referenced in issue #344 and trace the lifetime relationships around MainPythonInterpreter, acquire_gil(), and py.import("sys"). The fix is complete when the shown safe-code example no longer compiles because of lifetime bounds, and the regression test confirms the segmentation fault cannot occur.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100