Ticket #8147: gdb-null_pointer-subtitles

File gdb-null_pointer-subtitles, 12.0 KB (added by Suhwan, 7 years ago)
Line 
1GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
2Copyright (C) 2018 Free Software Foundation, Inc.
3License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
4This is free software: you are free to change and redistribute it.
5There is NO WARRANTY, to the extent permitted by law. Type "show copying"
6and "show warranty" for details.
7This GDB was configured as "x86_64-linux-gnu".
8Type "show configuration" for configuration details.
9For bug reporting instructions, please see:
10<http://www.gnu.org/software/gdb/bugs/>.
11Find the GDB manual and other documentation resources online at:
12<http://www.gnu.org/software/gdb/documentation/>.
13For help, type "help".
14Type "apropos word" to search for commands related to "word"...
15Reading symbols from ../ffmpeg/ffmpeg_g...done.
16(gdb) b ff_subtitles_queue_finalize
17Breakpoint 1 at 0x198a763: file libavformat/subtitles.c, line 197.
18(gdb) r
19Starting program: ffmpeg_g -y -r 62 -i samples/webm/corpora/bc03b6a77ef2c3decfc000fd072c0af23351f271 -target dv -map 0 -c copy -c: a:106 mov_text -disposition: a:20 wmv2 -aframes 89 -r 95 -ab 989k -ac 13 -b:v 520k output/tmp.wve
20[Thread debugging using libthread_db enabled]
21Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
22ffmpeg version N-94906-gcb8d6a4e3e Copyright (c) 2000-2019 the FFmpeg developers
23 built with clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
24 configuration: --cc=clang --cxx=clang++ --ld=clang --enable-debug --toolchain=clang-usan
25 libavutil 56. 35.100 / 56. 35.100
26 libavcodec 58. 56.101 / 58. 56.101
27 libavformat 58. 32.104 / 58. 32.104
28 libavdevice 58. 9.100 / 58. 9.100
29 libavfilter 7. 58.102 / 7. 58.102
30 libswscale 5. 6.100 / 5. 6.100
31 libswresample 3. 6.100 / 3. 6.100
32[lrc @ 0x922db40] Format lrc detected only with low score of 5, misdetection possible!
33
34Breakpoint 1, ff_subtitles_queue_finalize (log_ctx=0x922db40, q=0x922ea80)
35 at libavformat/subtitles.c:197
36197 qsort(q->subs, q->nb_subs, sizeof(*q->subs),
37(gdb) n
38libavformat/subtitles.c:197:11: runtime error: null pointer passed as argument 1, which is declared to never be null
39/usr/include/stdlib.h:828:30: note: nonnull attribute specified here
40198 q->sort == SUB_SORT_TS_POS ? cmp_pkt_sub_ts_pos
41(gdb) bt
42#0 ff_subtitles_queue_finalize (log_ctx=0x922db40, q=0x922ea80)
43 at libavformat/subtitles.c:198
44#1 0x00000000015d13e6 in lrc_read_header (s=<optimized out>)
45 at libavformat/lrcdec.c:213
46#2 0x00000000019ce98d in avformat_open_input (ps=0x7fffffffdaf0,
47 filename=0x7fffffffe501 "", fmt=<optimized out>, options=0x922d3d8)
48 at libavformat/utils.c:631
49#3 0x0000000000431ce8 in open_input_file (o=0x7fffffffdbd8,
50 filename=0x7fffffffe5b0 "samples/webm/corpora/bc03b6a77ef2c3decfc000fd072c0af23351f271") at fftools/ffmpeg_opt.c:1104
51#4 0x000000000042fb4f in open_files (l=0x922d2d8, inout=0x5bfe384 "input",
52 open_file=0x430710 <open_input_file>) at fftools/ffmpeg_opt.c:3275
53#5 0x000000000042f840 in ffmpeg_parse_options (argc=<optimized out>,
54 argv=<optimized out>) at fftools/ffmpeg_opt.c:3315
55#6 0x0000000000489a24 in main (argc=29, argv=0x7fffffffe218)
56 at fftools/ffmpeg.c:4872
57(gdb) disass $pc-32,$pc+32
58Dump of assembler code from 0x198a7a2 to 0x198a7e2:
59 0x000000000198a7a2 <ff_subtitles_queue_finalize+82>: mov $0x7,%dh
60 0x000000000198a7a4 <ff_subtitles_queue_finalize+84>: add %al,(%rax)
61 0x000000000198a7a6 <ff_subtitles_queue_finalize+86>: test %cl,%cl
62 0x000000000198a7a8 <ff_subtitles_queue_finalize+88>: je 0x198af77 <ff_subtitles_queue_finalize+2087>
63 0x000000000198a7ae <ff_subtitles_queue_finalize+94>: lea 0x8(%rsi),%rax
64 0x000000000198a7b2 <ff_subtitles_queue_finalize+98>: test $0x7,%al
65 0x000000000198a7b4 <ff_subtitles_queue_finalize+100>: mov %rax,0x18(%rsp)
66 0x000000000198a7b9 <ff_subtitles_queue_finalize+105>: jne 0x198af9b <ff_subtitles_queue_finalize+2123>
67 0x000000000198a7bf <ff_subtitles_queue_finalize+111>: movslq (%rax),%rbp
68=> 0x000000000198a7c2 <ff_subtitles_queue_finalize+114>: test %cl,%cl
69 0x000000000198a7c4 <ff_subtitles_queue_finalize+116>: je 0x198afc1 <ff_subtitles_queue_finalize+2161>
70 0x000000000198a7ca <ff_subtitles_queue_finalize+122>: lea 0x14(%rsi),%rbx
71 0x000000000198a7ce <ff_subtitles_queue_finalize+126>: test $0x3,%bl
72 0x000000000198a7d1 <ff_subtitles_queue_finalize+129>: jne 0x198afdd <ff_subtitles_queue_finalize+2189>
73 0x000000000198a7d7 <ff_subtitles_queue_finalize+135>: cmpl $0x0,(%rbx)
74 0x000000000198a7da <ff_subtitles_queue_finalize+138>: mov $0x198c1b0,%eax
75 0x000000000198a7df <ff_subtitles_queue_finalize+143>: mov $0x198c550,%ecx
76End of assembler dump.
77(gdb) info all-registers
78rax 0x922ea88 153283208
79rbx 0x9236c01 153316353
80rcx 0x419301 4297473
81rdx 0x6d 109
82rsi 0x922ea80 153283200
83rdi 0x7fffffffcef1 140737488342769
84rbp 0x0 0x0
85rsp 0x7fffffffd120 0x7fffffffd120
86r8 0x1 1
87r9 0x0 0
88r10 0x0 0
89r11 0x202 514
90r12 0x9236cc0 153316544
91r13 0x0 0
92r14 0x0 0
93r15 0x922db40 153279296
94rip 0x198a7c2 0x198a7c2 <ff_subtitles_queue_finalize+114>
95eflags 0x246 [ PF ZF IF ]
96cs 0x33 51
97ss 0x2b 43
98ds 0x0 0
99es 0x0 0
100fs 0x0 0
101gs 0x0 0
102st0 0 (raw 0x00000000000000000000)
103st1 0 (raw 0x00000000000000000000)
104st2 0 (raw 0x00000000000000000000)
105st3 0 (raw 0x00000000000000000000)
106st4 0 (raw 0x00000000000000000000)
107st5 0 (raw 0x00000000000000000000)
108st6 0 (raw 0x00000000000000000000)
109st7 0 (raw 0x00000000000000000000)
110fctrl 0xffff 65535
111fstat 0xffff 65535
112ftag 0xaaaa 43690
113fiseg 0x1 1
114fioff 0x0 0
115foseg 0x55a6 21926
116fooff 0xa 10
117fop 0x7ff 2047
118mxcsr 0x1fa0 [ PE IM DM ZM OM UM PM ]
119---Type <return> to continue, or q <return> to quit---
120bndcfgu {raw = 0x0, config = {base = 0x0, reserved = 0x0, preserved = 0x0,
121 enabled = 0x0}} {raw = 0x0, config = {base = 0, reserved = 0,
122 preserved = 0, enabled = 0}}
123bndstatus {raw = 0x0, status = {bde = 0x0, error = 0x0}} {raw = 0x0,
124 status = {bde = 0, error = 0}}
125ymm0 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
126 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x8, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0,
127 0xf0, 0xcd, 0xff, 0xff, 0xff, 0x7f, 0x0 <repeats 18 times>}, v16_int16 = {0x8,
128 0x0, 0x30, 0x0, 0xcdf0, 0xffff, 0x7fff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
129 0x0, 0x0}, v8_int32 = {0x8, 0x30, 0xffffcdf0, 0x7fff, 0x0, 0x0, 0x0, 0x0},
130 v4_int64 = {0x3000000008, 0x7fffffffcdf0, 0x0, 0x0}, v2_int128 = {
131 0x7fffffffcdf00000003000000008, 0x0}}
132ymm1 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
133 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
134 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
135 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
136ymm2 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
137 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
138 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
139 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
140ymm3 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
141 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
142 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
143 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
144ymm4 {v8_float = {0x0, 0x0, 0x9f, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
145 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0xb0, 0x81, 0x10, 0xba, 0x81, 0x8, 0x53,
146 0xb8, 0x81, 0x0, 0x1f, 0x43, 0xb6, 0x75, 0x1, 0x0 <repeats 17 times>},
147 v16_int16 = {0x81b0, 0xba10, 0x881, 0xb853, 0x81, 0x431f, 0x75b6, 0x1, 0x0, 0x0,
148 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v8_int32 = {0xba1081b0, 0xb8530881, 0x431f0081,
149 0x175b6, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0xb8530881ba1081b0, 0x175b6431f0081,
150 0x0, 0x0}, v2_int128 = {0x175b6431f0081b8530881ba1081b0, 0x0}}
151ymm5 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
152 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
153 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
154 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
155ymm6 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
156 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
157 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
158 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
159ymm7 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
160 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
161---Type <return> to continue, or q <return> to quit---
162 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
163 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
164ymm8 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
165 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
166 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
167 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
168ymm9 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
169 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
170 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
171 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
172ymm10 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
173 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
174 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
175 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
176ymm11 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
177 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
178 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
179 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
180ymm12 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
181 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
182 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
183 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
184ymm13 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
185 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
186 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
187 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
188ymm14 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
189 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
190 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
191 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
192ymm15 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
193 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
194 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
195 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
196bnd0 {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1 {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1
197bnd1 {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1 {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1
198bnd2 {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1 {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1
199bnd3 {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1 {lbound = 0x---Type <return> to continue, or q <return> to quit---
2000, ubound = 0xffffffffffffffff} : size -1
201(gdb)
202