-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Closed as not planned
Closed as not planned
Copy link
Labels
type-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Description
Bug report
Bug description:
Short untested example:
lst = ... # a numpy darray
res = func(lst.tolist()) # function in the C extension. edits in-place lst.tolist() -> returns a List. res depends on `lst`
print(res[0]) # Segmentation fault when accessing res in some wayfunc edits lst.tolist() in-place, and res depends on lst.tolist(), possibly res is lst.tolist().
We get a segfault when printing. It results of a GC collection error, probably because lst.tolist() is invalidly being freed. Assigning lst.tolist() to a variable fixes the segfault.
It might be Python intent to act like this.
CPython versions tested on:
3.9
Operating systems tested on:
Linux
Metadata
Metadata
Assignees
Labels
type-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump