You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Repeatedly calling a Python function eventually fails at the 256'th call.
The process terminates with SEGV or sometimes hang indefinitely.
🌍 Environment
Your operating system and version:
Ubuntu 18.04.1 LTS on Windows Subsystem for Linux.
I also noticed this bug on NixOS.
Your python version:
Python 3.6.6
How did you install python (e.g. apt or pyenv)? Did you use a virtualenv?:
Installed via apt
Your rust version (rustc --version):
rustc 1.32.0-nightly (6b9b97bd9 2018-11-15)
Are you using the latest pyo3 version? Have you tried using latest master (replace version = "0.x.y" with git = "https://github.com/PyO3/pyo3")?
0.5
I confirmed the latest master still reproduces the bug.
💥 Reproducing
extern crate pyo3;
use pyo3::prelude::*;
#[test]
fn call_many_times() -> PyResult<()> {
let guard = Python::acquire_gil();
let py = guard.python();
let math = py.import("math")?;
let exp = math.get("exp")?;
for i in 0..100000 {
println!("{}", i);
exp.call1((1.0_f64, ))?;
}
Ok(())
}
🐛 Bug Reports
Repeatedly calling a Python function eventually fails at the 256'th call.
The process terminates with SEGV or sometimes hang indefinitely.
🌍 Environment
Your operating system and version:
Ubuntu 18.04.1 LTS on Windows Subsystem for Linux.
I also noticed this bug on NixOS.
Your python version:
Python 3.6.6
How did you install python (e.g. apt or pyenv)? Did you use a virtualenv?:
Installed via
apt
Your rust version (
rustc --version
):rustc 1.32.0-nightly (6b9b97bd9 2018-11-15)
Are you using the latest pyo3 version? Have you tried using latest master (replace
version = "0.x.y"
withgit = "https://github.com/PyO3/pyo3")?
0.5
I confirmed the latest master still reproduces the bug.
💥 Reproducing
and
cargo test -- --nocapture
(I added--nocapture
to find the limit).You can get the code here: https://github.com/pandaman64/pyo3-test
Thank you
The text was updated successfully, but these errors were encountered: