Skip to content

segmentation fault with python for closing the script file #32

@peschue

Description

@peschue

I am getting the following segmentation fault with various repository versions (below from the current master f79438):

make check works, but the following does not:

$ dlvhex2 examples/python.hex --pythonplugin=./testsuite/plugin.py

In gdb this gives the following backtrace:

Program received signal SIGSEGV, Segmentation fault.
__GI___libc_free (mem=0x57c00046a0002) at malloc.c:2951
2951    malloc.c: No such file or directory.
(gdb) bt
#0  __GI___libc_free (mem=0x57c00046a0002) at malloc.c:2951
#1  0x00007ffff5ba694c in __GI__IO_free_backup_area (
    fp=0x72fe60) at genops.c:201
#2  __GI__IO_unsave_markers (fp=fp@entry=0x72fe60)
    at genops.c:1069
#3  0x00007ffff5ba3872 in _IO_new_file_close_it (
    fp=fp@entry=0x72fe60) at fileops.c:169
#4  0x00007ffff5b973ef in _IO_new_fclose (fp=0x72fe60)
    at iofclose.c:58
#5  0x00007ffff54e99ad in close_the_file (f=0x7ffff7eca5d0)
    at ../Objects/fileobject.c:456
#6  file_dealloc.lto_priv.330 (f=0x7ffff7eca5d0)
    at ../Objects/fileobject.c:617
#7  0x00007ffff694e7e8 in boost::python::exec_file(boost::python::str, boost::python::api::object, boost::python::api::object) ()
   from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.58.0
#8  0x00007ffff78ebd58 in dlvhex::PythonPlugin::createAtoms(dlvhex::ProgramCtx&) const ()
   from /home/ps/bin/dlvhex2_f79438/lib/libdlvhex2-base.so.12
#9  0x00007ffff78e264c in dlvhex::ProgramCtx::addPluginAtomsFromPluginContainer() ()
   from /home/ps/bin/dlvhex2_f79438/lib/libdlvhex2-base.so.12
#10 0x000000000041dc2f in main ()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions