Skip to content

Segfault reading binary sup file #26

@rudism

Description

@rudism

I've got a bunch of sup files extracted from a bluray disk. All of them seem to produce a segfault when trying to process them. Here's a gdb backtrace:

$ gdb --args sup2srt -l eng S01E04.eng.sup
GNU gdb (GDB) 16.3
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from sup2srt...
(gdb) r
Starting program: /home/rudism/.local/bin/sup2srt -l eng S01E04.eng.sup
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
Reading SUP from file...
SUP file has been read

Program received signal SIGSEGV, Segmentation fault.
__memcpy_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:461
warning: 461	../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file or directory
(gdb) bt
#0  __memcpy_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:461
#1  0x00007ffff5594934 in void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag) () from /usr/lib/libstdc++.so.6
#2  0x0000555555572c2a in objectDefinitionSegment::objectDefinitionSegment(char*, char*, char*, char*, char*, char*, char*) ()
#3  0x00005555555747aa in pgsParser::parseODS(char*, unsigned long) ()
#4  0x0000555555573993 in pgsParser::parseNextSegment() ()
#5  0x00005555555747f0 in pgsParser::parseAllSegments() ()
#6  0x00005555555735f0 in pgsParser::pgsParser(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >*) ()
#7  0x000055555555ac1d in main ()
(gdb)

I'm able to open the same sup files using subtitle-edit and see the subtitles OK. Here's the file from the backtrace above (zipped):

S01E04.eng.sup.zip

This was produced using a locally built copy, but I was encountering the segfault when using the docker method as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions