Skip to content

Segfaults when printing strings that have python values #342

Closed
@ghost

Description

Describe the bug
I have stumbled on many cases where when there is code that is trying to create a string with interpolated python values in it, a segfault can happen.

I don't have a clear way to reproduce the issue, this a stack trace when it happens, trying to log an exception:

XXX lineno: 85, opcode: 150

[20931] signal (11.1): Segmentation fault
in expression starting at none:0
PyEval_GetGlobals at /usr/local/src/conda/python-3.11.4/Python/ceval.c:7204 [inlined]
PyImport_Import at /usr/local/src/conda/python-3.11.4/Python/import.c:1990
PyImport_Import at /home/fra/.julia/packages/PythonCall/1f5yE/src/cpython/pointers.jl:299 [inlined]
macro expansion at /home/fra/.julia/packages/PythonCall/1f5yE/src/Py.jl:131 [inlined]
pyimport at /home/fra/.julia/packages/PythonCall/1f5yE/src/concrete/import.jl:11
#_showerror#13 at /home/fra/.julia/packages/PythonCall/1f5yE/src/err.jl:126
_showerror at /home/fra/.julia/packages/PythonCall/1f5yE/src/err.jl:113 [inlined]
showerror at /home/fra/.julia/packages/PythonCall/1f5yE/src/err.jl:109 [inlined]

Your system
Please provide detailed information about your system:
Julia Version 1.9.2
Commit e4ee485e909 (2023-07-05 09:39 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions