[Matroska-devel] libmatroska/ebml 0.9.0/0.8.0 is binary incompatible with previous version

Cristian Morales Vega cmorve69 at yahoo.es
Sat May 29 11:08:01 CEST 2010


A VLC compiled against 0.8.1/0.7.8 and running with 0.9.0/0.8.0
segfaults when opening a matroska file. For reproducibility purposes
lets say it fails with
http://matroska.free.fr/samples/anamorphic/starwars10MB-1.mkv, but
happens with all the files I tried. Compile the same VLC against
0.9.0/0.8.0 and there is no problem.

Should I change the soname in the openSUSE package (if so, to what?
I'm not sure about how will you name libebml2) or this can be fixed?

The backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffb49dc910 (LWP 16059)]
libebml::EbmlMaster::ReadData (this=0x15e0860, input=...,
ReadFully=18) at /usr/src/debug/libebml-0.8.0/src/EbmlMaster.cpp:172
172             input.setFilePointer(GetSize(), seek_current);
Current language:  auto
The current source language is "auto; currently c++".
(gdb) bt
#0  libebml::EbmlMaster::ReadData (this=0x15e0860, input=...,
ReadFully=18) at /usr/src/debug/libebml-0.8.0/src/EbmlMaster.cpp:172
#1  0x00007fffd9f45b61 in EbmlParser::Get (this=0x9d36b0) at Ebml_parser.cpp:173
#2  0x00007fffd9f44600 in demux_sys_t::AnalyseAllSegmentsFound
(this=0x15dfef0, p_demux=<value optimized out>, p_estream=<value
optimized out>, b_initial=<value optimized out>)
    at demux.cpp:107
#3  0x00007fffd9f33039 in Open (p_this=0x9d3598) at mkv.cpp:117
#4  0x00007ffff796a2e3 in __module_need (p_this=0x9d3598,
psz_capability=<value optimized out>, psz_name=<value optimized out>,
b_strict=<value optimized out>) at modules/modules.c:581
#5  0x00007ffff7927a35 in __demux_New (p_obj=0x7fffb49dbc88,
psz_access=0xc <Address 0xc out of bounds>, psz_demux=<value optimized
out>, psz_path=<value optimized out>,
    s=<value optimized out>, out=0x0, b_quick=false) at input/demux.c:167
#6  0x00007ffff793778d in InputSourceInit (p_input=0x9cf2e8,
in=0x9cff10, psz_mrl=0x9d5e80
"/home/reddwarf/test/starwars10MB-1.mkv", psz_forced_demux=<value
optimized out>)
    at input/input.c:2602
#7  0x00007ffff793886b in Init (p_input=0x9cf2e8) at input/input.c:1177
#8  0x00007ffff793b7a5 in Run (p_this=<value optimized out>) at
input/input.c:540
#9  0x00007ffff79707e4 in thread_entry (data=<value optimized out>) at
misc/threads.c:1093
#10 0x00007ffff76cd65d in start_thread () from /lib64/libpthread.so.0
#11 0x00007ffff743ce1d in clone () from /lib64/libc.so.6
#12 0x0000000000000000 in ?? ()


And, for what is worth, here is the differences in the vlc binaries
that openSUSE's build-compare script detects:

compare orig/vlc-noX-1.0.6-2.pm.2.3.x86_64.rpm
new/vlc-noX-1.0.6-2.pm.2.3.x86_64.rpm
/usr/lib64/vlc/demux/libmkv_plugin.so differs in assembler output
--- /tmp/tmp.J1RpX9mHjD 2010-05-29 10:57:12.676422882 +0200
+++ /tmp/tmp.LURQDwuOjX 2010-05-29 10:57:14.113547826 +0200
@@ -224,6 +224,11 @@
        pushq  $something
        jmpq   <_init + ofs>

+_ZN7libebml19EDocTypeReadVersionC1Ev at plt:
+       jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
+       pushq  $something
+       jmpq   <_init + ofs>
+
 _ZNSt8ios_base4InitC1Ev at plt:
        jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
        pushq  $something
@@ -479,6 +484,11 @@
        pushq  $something
        jmpq   <_init + ofs>

+_ZN11libmatroska10KaxNextUIDC1Ev at plt:
+       jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
+       pushq  $something
+       jmpq   <_init + ofs>
+
 _ZN14chapter_item_c15PublishChaptersER13input_title_tRii at plt:
        jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
        pushq  $something
@@ -509,6 +519,16 @@
        pushq  $something
        jmpq   <_init + ofs>

+_ZN7libebml11EbmlElementD2Ev at plt:
+       jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
+       pushq  $something
+       jmpq   <_init + ofs>
+
+_ZN11libmatroska22KaxContentCompSettingsC1Ev at plt:
+       jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
+       pushq  $something
+       jmpq   <_init + ofs>
+
 _ZN10EbmlParser12IsTopPresentEPN7libebml11EbmlElementE at plt:
        jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
        pushq  $something
@@ -564,6 +584,11 @@
        pushq  $something
        jmpq   <_init + ofs>

+_ZN11libmatroska16KaxSegmentFamilyC1Ev at plt:
+       jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
+       pushq  $something
+       jmpq   <_init + ofs>
+
 _ZNK11demux_sys_t13IsUsedSegmentER18matroska_segment_c at plt:
        jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
        pushq  $something
@@ -619,6 +644,11 @@
        pushq  $something
        jmpq   <_init + ofs>

+_ZN7libebml8EDocTypeC1Ev at plt:
+       jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
+       pushq  $something
+       jmpq   <_init + ofs>
+
 __stream_UrlNew at plt:
        jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
        pushq  $something
@@ -699,6 +729,11 @@
        pushq  $something
        jmpq   <_init + ofs>

+_ZN11libmatroska13KaxSegmentUIDC1Ev at plt:
+       jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
+       pushq  $something
+       jmpq   <_init + ofs>
+
 memmove at plt:
        jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
        pushq  $something
@@ -879,6 +914,11 @@
        pushq  $something
        jmpq   <_init + ofs>

+_ZN11libmatroska21KaxChapterProcessDataC1Ev at plt:
+       jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
+       pushq  $something
+       jmpq   <_init + ofs>
+
 sysfs_get_device_attributes at plt:
        jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
        pushq  $something
@@ -919,6 +959,11 @@
        pushq  $something
        jmpq   <_init + ofs>

+_ZN11libmatroska21KaxChapterTranslateIDC1Ev at plt:
+       jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
+       pushq  $something
+       jmpq   <_init + ofs>
+
 strncpy at plt:
        jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
        pushq  $something
@@ -1029,6 +1074,11 @@
        pushq  $something
        jmpq   <_init + ofs>

+_ZN11libmatroska10KaxPrevUIDC1Ev at plt:
+       jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
+       pushq  $something
+       jmpq   <_init + ofs>
+
 fwrite at plt:
        jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
        pushq  $something
@@ -1044,6 +1094,11 @@
        pushq  $something
        jmpq   <_init + ofs>

+_ZN11libmatroska24KaxChapterProcessPrivateC1Ev at plt:
+       jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
+       pushq  $something
+       jmpq   <_init + ofs>
+
 __stream_MemoryNew at plt:
        jmpq   *offset(%rip)        #   <_ZTVN7libebml10IOCallbackE + ofs>
        pushq  $something
@@ -2040,9 +2095,9 @@
        mov    %rbp,%rdi
        mov    offset(%r8),%r12
        callq  *offset(%r14)
-       mov    offset(%rax),%edi
        mov    (%rax),%edx
-       cmp    offset(%r12),%edi
+       mov    offset(%r12),%rdi
+       cmp    %rdi,offset(%rax)
        jne    <_ZN18matroska_segment_c4SeekElll + ofs>
        cmp    (%r12),%edx
        jne    <_ZN18matroska_segment_c4SeekElll + ofs>
@@ -2078,14 +2133,13 @@
        pop    %r14
        pop    %r15
        retq
-       nop
        jle    <_ZN18matroska_segment_c4SeekElll + ofs>
        cltq
-       mov    offset(%rbx),%r10
-       mov    offset(%rbp),%r11
+       mov    offset(%rbx),%r11
+       mov    offset(%rbp),%r10
        dec    %rax
        shl    $something,%rax
-       cmp    %r11,offset(%r10,%rax,1)
+       cmp    %r10,offset(%r11,%rax,1)
        jge    <_ZN18matroska_segment_c4SeekElll + ofs>
        jmp    <_ZN18matroska_segment_c4SeekElll + ofs>
        nop
@@ -2212,12 +2266,12 @@
        lea    offset(%rbp,%rax,1),%rdx
        mov    offset(%rdx),%rbp
        mov    offset(%rdx),%r14
-       mov    offset(%rbx),%r11
+       mov    offset(%rbx),%r10
        lea    offset(%rsp),%rdx
        mov    $something,%esi
        xor    %eax,%eax
-       mov    offset(%r11),%r10
-       mov    offset(%r10),%rdi
+       mov    offset(%r10),%r11
+       mov    offset(%r11),%rdi
        callq  <stream_Control at plt>
        mov    $something,%edi
        mov    %rbp,%rax
@@ -6992,8 +7046,8 @@
        nop
        nop

-_ZNK7libebml11EbmlElementltERKS0_:
-       mov    $something,%eax
+_ZNK7libebml11EbmlElement7GetSizeEv:
+       mov    offset(%rdi),%rax
        retq
        nop
        nop
@@ -7005,6 +7059,7 @@
        nop
        nop
        nop
+       nop

 _ZNK7libebml11EbmlElement7IsDummyEv:
        xor    %eax,%eax
@@ -7055,8 +7110,8 @@
        nop
        nop

-_ZNK7libebml10EbmlBinary7GetSizeEv:
-       mov    offset(%rdi),%rax
+_ZNK7libebml10EbmlBinary14IsDefaultValueEv:
+       xor    %eax,%eax



More information about the Matroska-devel mailing list