Ticket #8151: gdb-aiffdec

File gdb-aiffdec, 14.7 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 libavformat/aiffdec.c:245
17Breakpoint 1 at 0x1abb157: file libavformat/aiffdec.c, line 245.
18(gdb) ignore 1 2
19Will ignore next 2 crossings of breakpoint 1.
20(gdb) r
21Starting program: ffmpeg_g -t 2 -y -r 99 -i samples/samples.mplayerhq.hu/A-codecs/suite/AIFF/sample.PCM.8bit.8000Hz.Stereo.aif -loglevel 99 -map 0 -c copy -c: s:9 pcm_vidc -disposition: v:106 aptx_hd -r 36 -ar 48000 -ac 12 -strict 2 output/tmp.nsp
22[Thread debugging using libthread_db enabled]
23Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
24ffmpeg version N-94906-gcb8d6a4e3e Copyright (c) 2000-2019 the FFmpeg developers
25 built with clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
26 configuration: --cc=clang --cxx=clang++ --ld=clang --enable-debug --toolchain=clang-usan
27 libavutil 56. 35.100 / 56. 35.100
28 libavcodec 58. 56.101 / 58. 56.101
29 libavformat 58. 32.104 / 58. 32.104
30 libavdevice 58. 9.100 / 58. 9.100
31 libavfilter 7. 58.102 / 7. 58.102
32 libswscale 5. 6.100 / 5. 6.100
33 libswresample 3. 6.100 / 3. 6.100
34Splitting the commandline.
35Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '2'.
36Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
37Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '99'.
38Reading option '-i' ... matched as input url with argument 'samples/samples.mplayerhq.hu/A-codecs/suite/AIFF/sample.PCM.8bit.8000Hz.Stereo.aif'.
39Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
40Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0'.
41Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'.
42Reading option '-c:' ... matched as option 'c' (codec name) with argument 's:9'.
43Reading option 'pcm_vidc' ... matched as output url.
44Reading option '-disposition:' ... matched as option 'disposition' (disposition) with argument 'v:106'.
45Reading option 'aptx_hd' ... matched as output url.
46Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '36'.
47Reading option '-ar' ... matched as option 'ar' (set audio sampling rate (in Hz)) with argument '48000'.
48Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '12'.
49Reading option '-strict' ...Routing option strict to both codec and muxer layer
50 matched as AVOption 'strict' with argument '2'.
51Reading option 'output/tmp.nsp' ... matched as output url.
52Finished splitting the commandline.
53Parsing a group of options: global .
54Applying option y (overwrite output files) with argument 1.
55Applying option loglevel (set logging level) with argument 99.
56Successfully parsed a group of options.
57Parsing a group of options: input url samples/samples.mplayerhq.hu/A-codecs/suite/AIFF/sample.PCM.8bit.8000Hz.Stereo.aif.
58Applying option t (record or transcode "duration" seconds of audio/video) with argument 2.
59Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 99.
60Successfully parsed a group of options.
61Opening an input file: samples/samples.mplayerhq.hu/A-codecs/suite/AIFF/sample.PCM.8bit.8000Hz.Stereo.aif.
62[NULL @ 0x922dd80] Opening 'samples/samples.mplayerhq.hu/A-codecs/suite/AIFF/sample.PCM.8bit.8000Hz.Stereo.aif' for reading
63[file @ 0x922e980] Setting default whitelist 'file,crypto'
64Probing aiff score:100 size:2048
65[aiff @ 0x922dd80] Format aiff probed with size=2048 and score=100
66
67Breakpoint 1, aiff_read_header (s=0x922dd80) at libavformat/aiffdec.c:245
68245 filesize -= size + 8;
69(gdb) n
70libavformat/aiffdec.c:245:26: runtime error: signed integer overflow: 2147483647 + 8 cannot be represented in type 'int'
71libavformat/aiffdec.c:245:18: runtime error: signed integer overflow: 8 - -2147483641 cannot be represented in type 'int'
72247 switch (tag) {
73(gdb) bt
74#0 aiff_read_header (s=0x922dd80) at libavformat/aiffdec.c:247
75#1 0x00000000019ce98d in avformat_open_input (ps=0x7fffffffdae0,
76 filename=0x7fffffffe501 "\345\377\377\377\177", fmt=<optimized out>,
77 options=0x922d3d8) at libavformat/utils.c:631
78#2 0x0000000000431ce8 in open_input_file (o=0x7fffffffdbc8,
79 filename=0x7fffffffe5a2 "samples/samples.mplayerhq.hu/A-codecs/suite/AIFF/sample.PCM.8bit.8000Hz.Stereo.aif") at fftools/ffmpeg_opt.c:1104
80#3 0x000000000042fb4f in open_files (l=0x922d2d8, inout=0x5bfe384 "input",
81 open_file=0x430710 <open_input_file>) at fftools/ffmpeg_opt.c:3275
82#4 0x000000000042f840 in ffmpeg_parse_options (argc=<optimized out>,
83 argv=<optimized out>) at fftools/ffmpeg_opt.c:3315
84#5 0x0000000000489a24 in main (argc=29, argv=0x7fffffffe208)
85 at fftools/ffmpeg.c:4872
86(gdb) disass $pc-32,$pc+32
87Dump of assembler code from 0x1abb444 to 0x1abb484:
88 0x0000000001abb444 <aiff_read_header+1220>: sbb %ch,%bh
89 0x0000000001abb446 <aiff_read_header+1222>: (bad)
90 0x0000000001abb447 <aiff_read_header+1223>: incl -0xa(%rcx,%rcx,4)
91 0x0000000001abb44b <aiff_read_header+1227>: mov %ebx,%edx
92 0x0000000001abb44d <aiff_read_header+1229>: mov $0x6c50620,%edi
93 0x0000000001abb452 <aiff_read_header+1234>: callq 0x42e610 <__ubsan_handle_sub_overflow>
94 0x0000000001abb457 <aiff_read_header+1239>: mov 0x90(%rsp),%rax
95 0x0000000001abb45f <aiff_read_header+1247>: mov 0x18(%rsp),%rsi
96=> 0x0000000001abb464 <aiff_read_header+1252>: cmp $0x4d435040,%ebp
97 0x0000000001abb46a <aiff_read_header+1258>: jle 0x1abb18a <aiff_read_header+522>
98 0x0000000001abb470 <aiff_read_header+1264>: cmp $0x4f4e4e40,%ebp
99 0x0000000001abb476 <aiff_read_header+1270>: mov 0x68(%rsp),%r14
100 0x0000000001abb47b <aiff_read_header+1275>: jle 0x1abb548 <aiff_read_header+1480>
101 0x0000000001abb481 <aiff_read_header+1281>: cmp $0x4f4e4e41,%ebp
102End of assembler dump.
103(gdb) info all-registers
104rax 0x922ddb0 153279920
105rbx 0x80000007 2147483655
106rcx 0x419397 4297623
107rdx 0x6d 109
108rsi 0x922edd0 153284048
109rdi 0x7fffffffd2c1 140737488343745
110rbp 0x30003 0x30003
111rsp 0x7fffffffd4f0 0x7fffffffd4f0
112r8 0x1 1
113r9 0x0 0
114r10 0x0 0
115r11 0x206 518
116r12 0x9236e40 153316928
117r13 0x922dd80 153279872
118r14 0x8 8
119r15 0x9236e01 153316865
120rip 0x1abb464 0x1abb464 <aiff_read_header+1252>
121eflags 0x206 [ PF IF ]
122cs 0x33 51
123ss 0x2b 43
124ds 0x0 0
125es 0x0 0
126fs 0x0 0
127gs 0x0 0
128st0 0 (raw 0x00000000000000000000)
129st1 0 (raw 0x00000000000000000000)
130st2 0 (raw 0x00000000000000000000)
131st3 0 (raw 0x00000000000000000000)
132st4 0 (raw 0x00000000000000000000)
133st5 0 (raw 0x00000000000000000000)
134st6 0 (raw 0x00000000000000000000)
135st7 0 (raw 0x00000000000000000000)
136fctrl 0xffff 65535
137fstat 0xffff 65535
138ftag 0xaaaa 43690
139fiseg 0x1 1
140fioff 0x0 0
141foseg 0x55bc 21948
142fooff 0xa 10
143fop 0x7ff 2047
144mxcsr 0x1fa0 [ PE IM DM ZM OM UM PM ]
145---Type <return> to continue, or q <return> to quit---
146bndcfgu {raw = 0x0, config = {base = 0x0, reserved = 0x0, preserved = 0x0,
147 enabled = 0x0}} {raw = 0x0, config = {base = 0, reserved = 0,
148 preserved = 0, enabled = 0}}
149bndstatus {raw = 0x0, status = {bde = 0x0, error = 0x0}} {raw = 0x0,
150 status = {bde = 0, error = 0}}
151ymm0 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
152 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x8, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0,
153 0x80, 0xd1, 0xff, 0xff, 0xff, 0x7f, 0x0 <repeats 18 times>}, v16_int16 = {0x8,
154 0x0, 0x30, 0x0, 0xd180, 0xffff, 0x7fff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
155 0x0, 0x0}, v8_int32 = {0x8, 0x30, 0xffffd180, 0x7fff, 0x0, 0x0, 0x0, 0x0},
156 v4_int64 = {0x3000000008, 0x7fffffffd180, 0x0, 0x0}, v2_int128 = {
157 0x7fffffffd1800000003000000008, 0x0}}
158ymm1 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
159 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
160 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
161 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
162ymm2 {v8_float = {0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
163 0x1, 0x0, 0x0, 0x0}, v32_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf0, 0x3f,
164 0x0 <repeats 24 times>}, v16_int16 = {0x0, 0x0, 0x0, 0x3ff0,
165 0x0 <repeats 12 times>}, v8_int32 = {0x0, 0x3ff00000, 0x0, 0x0, 0x0, 0x0, 0x0,
166 0x0}, v4_int64 = {0x3ff0000000000000, 0x0, 0x0, 0x0}, v2_int128 = {
167 0x3ff0000000000000, 0x0}}
168ymm3 {v8_float = {0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
169 0x1, 0x0, 0x0, 0x0}, v32_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf0, 0x3f,
170 0x0 <repeats 24 times>}, v16_int16 = {0x0, 0x0, 0x0, 0x3ff0,
171 0x0 <repeats 12 times>}, v8_int32 = {0x0, 0x3ff00000, 0x0, 0x0, 0x0, 0x0, 0x0,
172 0x0}, v4_int64 = {0x3ff0000000000000, 0x0, 0x0, 0x0}, v2_int128 = {
173 0x3ff0000000000000, 0x0}}
174ymm4 {v8_float = {0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
175 0x1, 0x0, 0x0, 0x0}, v32_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf0, 0x3f,
176 0x0 <repeats 24 times>}, v16_int16 = {0x0, 0x0, 0x0, 0x3ff0,
177 0x0 <repeats 12 times>}, v8_int32 = {0x0, 0x3ff00000, 0x0, 0x0, 0x0, 0x0, 0x0,
178 0x0}, v4_int64 = {0x3ff0000000000000, 0x0, 0x0, 0x0}, v2_int128 = {
179 0x3ff0000000000000, 0x0}}
180ymm5 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
181 0x8000000000000000, 0x8000000000000000, 0x0, 0x0}, v32_int8 = {0xff, 0xff,
182 0xff, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0xff,
183 0x0 <repeats 16 times>}, v16_int16 = {0xffff, 0xff, 0xff, 0xffff, 0x0, 0xff,
184 0x0, 0xff00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v8_int32 = {0xffffff,
185 0xffff00ff, 0xff0000, 0xff000000, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {
186 0xffff00ff00ffffff, 0xff00000000ff0000, 0x0, 0x0}, v2_int128 = {
187---Type <return> to continue, or q <return> to quit---
188 0xff00000000ff0000ffff00ff00ffffff, 0x0}}
189ymm6 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
190 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0, 0x0, 0x0, 0x0, 0xff,
191 0x0 <repeats 27 times>}, v16_int16 = {0x0, 0x0, 0xff, 0x0 <repeats 13 times>},
192 v8_int32 = {0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0xff00000000,
193 0x0, 0x0, 0x0}, v2_int128 = {0xff00000000, 0x0}}
194ymm7 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
195 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
196 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
197 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
198ymm8 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
199 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0, 0x1b, 0x5b, 0x34, 0x38, 0x3b, 0x35,
200 0x3b, 0x25, 0x75, 0x6d, 0x1b, 0x5b, 0x33, 0x38, 0x3b, 0x0 <repeats 16 times>},
201 v16_int16 = {0x1b00, 0x345b, 0x3b38, 0x3b35, 0x7525, 0x1b6d, 0x335b, 0x3b38,
202 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v8_int32 = {0x345b1b00, 0x3b353b38,
203 0x1b6d7525, 0x3b38335b, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x3b353b38345b1b00,
204 0x3b38335b1b6d7525, 0x0, 0x0}, v2_int128 = {
205 0x3b38335b1b6d75253b353b38345b1b00, 0x0}}
206ymm9 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
207 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
208 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
209 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
210ymm10 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
211 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
212 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
213 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
214ymm11 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
215 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
216 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
217 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
218ymm12 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
219 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
220 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
221 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
222ymm13 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
223 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
224 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
225 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
226ymm14 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
227 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
228 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
229---Type <return> to continue, or q <return> to quit---
230 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
231ymm15 {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {
232 0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {
233 0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
234 v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
235bnd0 {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1 {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1
236bnd1 {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1 {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1
237bnd2 {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1 {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1
238bnd3 {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1 {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1
239