Created
September 15, 2011 23:12
-
-
Save 2bits/1220758 to your computer and use it in GitHub Desktop.
movgrab-1.1.0 segfault on OSX in STREAMReadBytes from file.c line 643
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// here is the function that's getting an exc_bad_access | |
int STREAMReadBytes(STREAM *S, char *Buffer, int Buffsize) | |
{ | |
char *ptr=NULL; | |
int bytes=0, result=0, total=0; | |
ptr=Buffer; | |
if (S->InStart >= S->InEnd) | |
{ | |
result=STREAMReadCharsToBuffer(S); | |
if (S->InStart >= S->InEnd) | |
{ | |
if (result==STREAM_CLOSED) return(EOF); | |
if (result==STREAM_TIMEOUT) return(STREAM_TIMEOUT); | |
if (result==STREAM_DATA_ERROR) return(STREAM_DATA_ERROR); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(gdb) bt | |
#0 0x0000000100008b18 in STREAMReadBytes (S=0x100a70, Buffer=0x7fff5fbff04f "", Buffsize=1) at file.c:643 | |
#1 0x0000000100008fd4 in STREAMReadChar (S=0x100a70) at file.c:789 | |
#2 0x0000000100009138 in STREAMReadToTerminator (Buffer=0x1001025b0 "", S=0x100a70, Term=10 '\n') at file.c:849 | |
#3 0x00000001000092a2 in STREAMReadLine (Buffer=0x1001025b0 "", S=0x100a70) at file.c:919 | |
#4 0x0000000100017b3f in ExtractItemInfo (S=0x100a70, Type=2, URL=0x100100570 "http://www.youtube.com/get_video_info?&video_id=oP59tQf_njc&el=detailpage&ps=default&eurl=&gl=US&hl=enB", Server=0x100100370 "www.youtube.com", Port=80, Title=0x0, Flags=0) at servicetypes.c:797 | |
#5 0x0000000100001e32 in DownloadPage (Path=0x100100570 "http://www.youtube.com/get_video_info?&video_id=oP59tQf_njc&el=detailpage&ps=default&eurl=&gl=US&hl=enB", Type=2, Title=0x0, DLFlags=0) at main.c:380 | |
#6 0x0000000100001438 in GrabMovie (Path=0x100100140 "http://www.youtube.com/watch?v=oP59tQf_njc", MovType=0) at main.c:174 | |
#7 0x0000000100002cb4 in main (argc=2, argv=0x7fff5fbff2b0) at main.c:580 | |
(gdb) quit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Process: movgrab [45067] | |
Path: /private/tmp/homebrew-movgrab-1.1.0-5E7p/movgrab-1.1.0/movgrab | |
Identifier: movgrab | |
Version: ??? (???) | |
Code Type: X86-64 (Native) | |
Parent Process: bash [42695] | |
Date/Time: 2011-09-15 15:48:24.764 -0700 | |
OS Version: Mac OS X 10.6.8 (10K549) | |
Report Version: 6 | |
Interval Since Last Report: 1251044 sec | |
Crashes Since Last Report: 64 | |
Per-App Crashes Since Last Report: 8 | |
Anonymous UUID: A06FA97F-461C-4299-AF31-711F4F961C3B | |
Exception Type: EXC_BAD_ACCESS (SIGSEGV) | |
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000100a18 | |
Crashed Thread: 0 Dispatch queue: com.apple.main-thread | |
Thread 0 Crashed: Dispatch queue: com.apple.main-thread | |
0 movgrab 0x0000000100008b18 STREAMReadBytes + 60 (file.c:643) | |
1 movgrab 0x0000000100008fd4 STREAMReadChar + 30 (file.c:789) | |
2 movgrab 0x0000000100009138 STREAMReadToTerminator + 55 (file.c:849) | |
3 movgrab 0x00000001000092a2 STREAMReadLine + 34 (file.c:920) | |
4 movgrab 0x0000000100017b3f ExtractItemInfo + 252 (servicetypes.c:797) | |
5 movgrab 0x0000000100001e32 DownloadPage + 278 (main.c:380) | |
6 movgrab 0x0000000100001438 GrabMovie + 501 (main.c:174) | |
7 movgrab 0x0000000100002cb4 main + 436 (main.c:580) | |
8 movgrab 0x0000000100000c4c start + 52 | |
Thread 0 crashed with X86 Thread State (64-bit): | |
rax: 0x00000000001009f0 rbx: 0x00000001001002d0 rcx: 0x000000000000fffd rdx: 0x0000000000000001 | |
rdi: 0x00000000001009f0 rsi: 0x00007fff5fbff09f rbp: 0x00007fff5fbff070 rsp: 0x00007fff5fbff030 | |
r8: 0x0000000000000003 r9: 0x0000000000000013 r10: 0x000000000000000a r11: 0x0000000000000246 | |
r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000000000000 r15: 0x0000000000000000 | |
rip: 0x0000000100008b18 rfl: 0x0000000000010206 cr2: 0x0000000000100a18 | |
Binary Images: | |
0x100000000 - 0x100023fff +movgrab ??? (???) <55A4A7A1-A85D-3107-8CDF-BB8BEC3B7EC5> /tmp/homebrew-movgrab-1.1.0-5E7p/movgrab-1.1.0/movgrab | |
0x7fff5fc00000 - 0x7fff5fc3bdef dyld 132.1 (???) <B536F2F1-9DF1-3B6C-1C2C-9075EA219A06> /usr/lib/dyld | |
0x7fff85c6e000 - 0x7fff85c7fff7 libz.1.dylib 1.2.3 (compatibility 1.0.0) <FB5EE53A-0534-0FFA-B2ED-486609433717> /usr/lib/libz.1.dylib | |
0x7fff8755f000 - 0x7fff87720fef libSystem.B.dylib 125.2.11 (compatibility 1.0.0) <9AB4F1D1-89DC-0E8A-DC8E-A4FE4D69DB69> /usr/lib/libSystem.B.dylib | |
0x7fff89761000 - 0x7fff89765ff7 libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <95718673-FEEE-B6ED-B127-BCDBDB60D4E5> /usr/lib/system/libmathCommon.A.dylib | |
0x7fffffe00000 - 0x7fffffe01fff libSystem.B.dylib ??? (???) <9AB4F1D1-89DC-0E8A-DC8E-A4FE4D69DB69> /usr/lib/libSystem.B.dylib |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment