Skip to content

xreader core dumps with segmentation fault in libepubdocument.so on some epub files  #499

@vjayer

Description

@vjayer
 * Xreader version (xreader --version)
 * xreader 2.8.3
 
 * Distribution - (Mint 17.2, Arch, Fedora 25, etc...)
 * LinuxMint 20.1 (ulyssa) MATE

Issue
xreader core dumps with segmentation fault on some epub files

dmesg will show:
[37956.124484] EvJobScheduler[23341]: segfault at 18 ip 00007f1260052b80 sp 00007f1202ffc8a8 error 4 in libepubdocument.so[7f1260051000+7000]

but since ulimit -c is 0 by default, no core dump is created

Steps to reproduce

I can supply the sample epub files to reproduce the issue on request

ulimit -c unlimited
xreader < .. epub .. >

this is all I get:
gdb /usr/bin/xreader core
....

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fc7c8913e57 in ?? () from /usr/lib/x86_64-linux-gnu/xreader/3/backends/libepubdocument.so
[Current thread is 1 (Thread 0x7fc7b9947700 (LWP 22841))]
(gdb) bt
#0  0x00007fc7c8913e57 in ?? () from /usr/lib/x86_64-linux-gnu/xreader/3/backends/libepubdocument.so
#1  0x00007fc7d5b7cd50 in g_list_foreach () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fc7c891664d in ?? () from /usr/lib/x86_64-linux-gnu/xreader/3/backends/libepubdocument.so
#3  0x00007fc7d5eb2ec6 in ev_document_load () from /usr/lib/x86_64-linux-gnu/libxreaderdocument.so.3
#4  0x00007fc7d5eb497f in ev_document_factory_get_document ()
   from /usr/lib/x86_64-linux-gnu/libxreaderdocument.so.3
#5  0x00007fc7d5ef831c in ?? () from /usr/lib/x86_64-linux-gnu/libxreaderview.so.3
#6  0x00007fc7d5ef93a2 in ?? () from /usr/lib/x86_64-linux-gnu/libxreaderview.so.3
#7  0x00007fc7d5baaad1 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007fc7d13ae609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9  0x00007fc7d4cf3293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95


Expected behaviour
epub opens normally

Other information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions