[vlc-devel] Crash due to zero MTU in access_output_udp

Alexander Gall gall at switch.ch
Thu Aug 23 11:36:06 CEST 2007


I'm trying to relay an mpeg4 stream (via RTSP) as IPv4 and IPv6
multicast with the following --sout option

#duplicate{dst=std{access=rtp,mux=ts,dst=233.2.47.11:1234},dst=std{access=rtp,mux=ts,dst=[ff15::11]:1234,ttl=1}}

VLC crashes 

t at 14 (l at 14) terminated by signal SEGV (no mapping at the fault address)
0xff340e20: _memcpy+0x0660:     stda     %f32, [%o0] 0xf0
Current function is Write
  508                       p_buffer->p_buffer, i_write );
(dbx) where
current thread: t at 14
  [1] _memcpy(0x800000, 0x7be8f8, 0xffb43270, 0x4, 0x4, 0xfffffff8), at 0xff340e20
=>[2] Write(p_access = 0x383fa0, p_buffer = 0x301af0), line 508 in "udp.c"
  [3] sout_AccessOutWrite(p_access = 0x383fa0, p_buffer = 0x301af0), line 344 in "stream_output.c"
  [4] TSDate(p_mux = 0x343f38, p_chain_ts = 0xfad7bab8, i_pcr_length = 236037LL, i_pcr_dts = 508821048961LL), line 1827 in "ts.c"
  [5] TSSchedule(p_mux = 0x343f38, p_chain_ts = 0xfad7bc78,
i_pcr_length = 236037LL, i_pcr_dts = 508821048961LL), line 1767 in "ts.c"
  [6] Mux(p_mux = 0x343f38), line 1642 in "ts.c"
  [7] sout_MuxSendBuffer(p_mux = 0x343f38, p_input = 0x231990, p_buffer = 0x445b68), line 570 in "stream_output.c"
  [8] Send(p_stream = 0x341c40, id = 0x2deec8, p_buffer = 0x445b68), line 484 in "standard.c"
  [9] Send(p_stream = 0x2eacc8, id = 0x2bfc40, p_buffer = 0x4ad8a8), line 271 in "duplicate.c"
  [10] sout_InputSendBuffer(p_input = 0x231930, p_buffer = 0x4ad8a8), line 226 in "stream_output.c"
  [11] DecoderDecode(p_dec = 0x262470, p_block = 0x4a12a8), line 654 in "decoder.c"
  [12] DecoderThread(p_dec = 0x262470), line 457 in "decoder.c"

It turns out that the MTU from p_sys->i_mtu is zero

(dbx) print p_sys->i_mtu
p_sys->i_mtu = 0

And the number of bytes to be copied in the memcpy() call is negative
(0 - RTP_HEADER_LENGTH)

(dbx) print i_payload_size
i_payload_size = -12

I checked that the p_sys->i_mtu is already zero when it is initialized
in modules/access_output.c:Open()

378    p_sys->i_mtu = var_GetInteger( p_this, "mtu" );

This mtu gets manipulated in a couple of places.  I don't know where
it goes wrong.

-- 
Alex

_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
http://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list