<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>15410</bug_id>
          
          <creation_ts>2008-04-20 12:32:46 +0400</creation_ts>
          <short_desc>xine-list от рута падает</short_desc>
          <delta_ts>2008-04-23 19:30:00 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>libxine</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrey Rahmatullin">wrar</reporter>
          <assigned_to name="Nobody&apos;s working on this, feel free to take it">nobody</assigned_to>
          
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68670</commentid>
    <comment_count>0</comment_count>
    <who name="Andrey Rahmatullin">wrar</who>
    <bug_when>2008-04-20 12:32:46 +0400</bug_when>
    <thetext>wrar@wrars-comp ~ $ xine-list
application/annodex;application/x-annodex;audio/annodex;audio/x-annodex;video/
annodex;video/x-annodex;image/png;image/x-png;video/mng;video/x-mng;audio/
x-8svx;audio/8svx;audio/x-16sv;audio/168sv;image/x-ilbm;image/ilbm;video/x-
anim;video/anim;video/x-ms-asf;video/x-ms-wmv;audio/x-ms-wma;application/vnd.ms-
asf;application/x-mplayer2;video/x-ms-asf-plugin;video/x-ms-wvx;video/x-ms-
wax;audio/x-aiff;audio/aiff;audio/x-pn-aiff;audio/x-flac;audio/flac;audio/x-
realaudio;audio/basic;audio/x-basic;audio/x-pn-au;video/msvideo;video/x-
msvideo;video/x-flic;video/x-flv;video/flv;application/x-flash-
video;application/ogg;application/x-ogg;application/x-ogm;application/x-ogm-
audio;application/x-ogm-video;audio/ogg;audio/x-ogg;video/ogg;video/x-ogg;video/
quicktime;video/x-quicktime;video/3gpp;video/mp4;audio/mp4;audio/x-
m4a;application/x-quicktimeplayer;audio/x-pn-realaudio;audio/x-pn-realaudio-
plugin;audio/x-real-audio;application/vnd.rn-realmedia;video/mkv;video/x-
matroska;video/mpeg;video/x-mpeg;audio/x-wav;audio/wav;audio/x-pn-wav;audio/x-
pn-windows-acm;audio/mpeg2;audio/x-mpeg2;audio/mpeg3;audio/x-mpeg3;audio/
mpeg;audio/x-mpeg;audio/x-mpegurl;audio/mpegurl;audio/mp3;audio/x-mp3;audio/x-
wavpack;

wrar@wrars-comp ~ $ sudo /usr/bin/xine-list
zsh: segmentation fault  sudo /usr/bin/xine-list

wrar@wrars-comp ~ $ sudo strace -Ff /usr/bin/xine-list        
[...]
open(&quot;/usr/lib/xine/plugins/1.21/xineplug_inp_dvd.so&quot;, O_RDONLY) = 3
read(3, &quot;\177ELF
\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\27\0\0004\0\0\0\320&quot;..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=167352, ...}) = 0
mmap2(NULL, 170308, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0xb7f2f000
mmap2(0xb7f58000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0x28) = 0xb7f58000
close(3)                                = 0
open(&quot;/etc/ld.so.cache&quot;, O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=169804, ...}) = 0
mmap2(NULL, 169804, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ea5000
close(3)                                = 0
open(&quot;/usr/lib/libdvdcss.so.2&quot;, O_RDONLY) = 3
read(3, &quot;\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\1;J4\0\0\0\4&quot;..., 
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=31508, ...}) = 0
mmap2(0x4a3af000, 31240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) 
= 0x4a3af000
mmap2(0x4a3b6000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0x7) = 0x4a3b6000
close(3)                                = 0
munmap(0xb7ea5000, 169804)              = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68671</commentid>
    <comment_count>1</comment_count>
    <who name="Andrey Rahmatullin">wrar</who>
    <bug_when>2008-04-20 12:33:02 +0400</bug_when>
    <thetext>Да, под gdb всё нормально.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68674</commentid>
    <comment_count>2</comment_count>
    <who name="Andrey Rahmatullin">wrar</who>
    <bug_when>2008-04-20 12:34:17 +0400</bug_when>
    <thetext>*** Bug 15411 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68675</commentid>
    <comment_count>3</comment_count>
    <who name="Andrey Rahmatullin">wrar</who>
    <bug_when>2008-04-20 12:35:00 +0400</bug_when>
    <thetext>$ sudo valgrind xine-list
==9826== Memcheck, a memory error detector.
==9826== Copyright (C) 2002-2007, and GNU GPL&apos;d, by Julian Seward et al.
==9826== Using LibVEX rev 1732, a library for dynamic binary translation.
==9826== Copyright (C) 2004-2007, and GNU GPL&apos;d, by OpenWorks LLP.
==9826== Using valgrind-3.2.3, a dynamic binary instrumentation framework.
==9826== Copyright (C) 2000-2007, and GNU GPL&apos;d, by Julian Seward et al.
==9826== For more details, rerun with: -v
==9826==
==9826== Invalid read of size 1
==9826==    at 0x40061A8: strlen (mc_replace_strmem.c:246)
==9826==    by 0x400AC9D: (within /usr/lib/xine/plugins/1.21/
xineplug_inp_dvd.so)
==9826==  Address 0x0 is not stack&apos;d, malloc&apos;d or (recently) free&apos;d
==9826==
==9826== Process terminating with default action of signal 11 (SIGSEGV)
==9826==  Access not within mapped region at address 0x0
==9826==    at 0x40061A8: strlen (mc_replace_strmem.c:246)
==9826==    by 0x400AC9D: (within /usr/lib/xine/plugins/1.21/
xineplug_inp_dvd.so)
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68689</commentid>
    <comment_count>4</comment_count>
    <who name="">led</who>
    <bug_when>2008-04-21 05:28:30 +0400</bug_when>
    <thetext>Мне не удалось добиться того, что xine-list &quot;падал от рута&quot;...
Может у вас sudo сегфолтится?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68690</commentid>
    <comment_count>5</comment_count>
    <who name="">led</who>
    <bug_when>2008-04-21 05:31:45 +0400</bug_when>
    <thetext>Давайте хоть параметры архитектуры, версию ядра - может удастся 
воспроизвести...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68691</commentid>
    <comment_count>6</comment_count>
    <who name="Andrey Rahmatullin">wrar</who>
    <bug_when>2008-04-21 08:17:45 +0400</bug_when>
    <thetext>(In reply to comment #4)
&gt; Может у вас sudo сегфолтится?
При чём тут sudo? И вы правда не посмотрели вывод valgrind?

(In reply to comment #5)
&gt; Давайте хоть параметры архитектуры, версию ядра - может удастся 
&gt; воспроизвести...
i586, 2.6.25, libxine-1.1.12-alt1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68695</commentid>
    <comment_count>7</comment_count>
    <who name="Andrey Rahmatullin">wrar</who>
    <bug_when>2008-04-21 08:55:29 +0400</bug_when>
    <thetext>Собранное с дебагом:

==2683== Invalid read of size 1
==2683==    at 0x40061A8: strlen (mc_replace_strmem.c:246)
==2683==    by 0x400AC9D: init_class (input_dvd.c:1825)
==2683==  Address 0x0 is not stack&apos;d, malloc&apos;d or (recently) free&apos;d
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68762</commentid>
    <comment_count>8</comment_count>
    <who name="">led</who>
    <bug_when>2008-04-22 04:07:46 +0400</bug_when>
    <thetext>(In reply to comment #7)
&gt; Собранное с дебагом:
&gt; 
&gt; ==2683== Invalid read of size 1
&gt; ==2683==    at 0x40061A8: strlen (mc_replace_strmem.c:246)
&gt; ==2683==    by 0x400AC9D: init_class (input_dvd.c:1825)
&gt; ==2683==  Address 0x0 is not stack&apos;d, malloc&apos;d or (recently) free&apos;d

Спасибо, более-менее проясняется...
Почти уверен, что это из-за отсутствия TMPDIR (только в этом случае и 
проявляется)

Есть идеи, что подставить в качестве TMPDIR, если getenv(&quot;TMPDIR&quot;) вернул NULL?

Кстати, ИМХО отсутсвие TMPDIR само по себе уже похоже на ошибку и 
может &quot;велезти боком&quot; ещё где-то :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68763</commentid>
    <comment_count>9</comment_count>
    <who name="Sir Raorn">raorn</who>
    <bug_when>2008-04-22 08:36:07 +0400</bug_when>
    <thetext>(In reply to comment #8)
&gt; Есть идеи, что подставить в качестве TMPDIR, если getenv(&quot;TMPDIR&quot;) вернул NULL?

Вроде /tmp по SUSv3, если не ошибаюсь.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68857</commentid>
    <comment_count>10</comment_count>
    <who name="">led</who>
    <bug_when>2008-04-23 19:30:00 +0400</bug_when>
    <thetext>fixed  in xine-1.1.12-alt2</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>