Segmentation fault on Mac OS 10.6.4

Bug #630301 reported by Kirill Temnov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cuneiform for Linux
New
Undecided
Unassigned

Bug Description

 $ uname -a
Darwin MBP-selead.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386

$cuneiform txt.bmp
Cuneiform for Linux 1.0.0
Segmentation fault

$ gdb -q --args cuneiform -l eng txt.bmp
Reading symbols for shared libraries .................................................. done
(gdb) r
Starting program: /usr/local/bin/cuneiform -l eng txt.bmp
Reading symbols for shared libraries .+++++++++++++++++++++++++++++++++++++++++++++++++............warning: Could not find object file "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_bzip2/work/bzip2-1.0.5/blocksort.o" - no debug information available for "blocksort.c".

warning: Could not find object file "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_bzip2/work/bzip2-1.0.5/huffman.o" - no debug information available for "huffman.c".

warning: Could not find object file "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_bzip2/work/bzip2-1.0.5/crctable.o" - no debug information available for "crctable.c".

warning: Could not find object file "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_bzip2/work/bzip2-1.0.5/randtable.o" - no debug information available for "randtable.c".

warning: Could not find object file "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_bzip2/work/bzip2-1.0.5/compress.o" - no debug information available for "compress.c".

warning: Could not find object file "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_bzip2/work/bzip2-1.0.5/decompress.o" - no debug information available for "decompress.c".

warning: Could not find object file "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_bzip2/work/bzip2-1.0.5/bzlib.o" - no debug information available for "bzlib.c".

....................................................................... done
Reading symbols for shared libraries . done
Cuneiform for Linux 1.0.0
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000003000350
0x00007fff83dd1180 in strlen ()
(gdb) bt
#0 0x00007fff83dd1180 in strlen ()
#1 0x00007fff83ddca7c in __vfprintf ()
#2 0x00007fff83e0fa07 in vsnprintf ()
#3 0x00007fff83e0f886 in __sprintf_chk ()
#4 0x0000000100a9a5b2 in CTB_files_init (filename=0x1007dbf29 "ct666666", data=0x7fff5fbfead0 "&", maxX=256, maxY=128, dpb=8, signums=0 '\0', attr_size=38 '&') at /Users/selead/Downloads/cuneiform-linux-1.0.0 2/cuneiform_src/Kern/ctb/src/ctb_tool.c:1402
#5 0x0000000100a98119 in CTB_create (file_name=0x1007dbf29 "ct666666", data=0x7fff5fbfead0 "&") at /Users/selead/Downloads/cuneiform-linux-1.0.0 2/cuneiform_src/Kern/ctb/src/ctb_tool.c:381
#6 0x000000010076c9e6 in rstr_open_cont () at /Users/selead/Downloads/cuneiform-linux-1.0.0 2/cuneiform_src/Kern/rstr/src/rstr_con.c:159
#7 0x00000001007648ee in RSTRNewPage (resolutiony=200, myPage=0x1030010c0) at /Users/selead/Downloads/cuneiform-linux-1.0.0 2/cuneiform_src/Kern/rstr/src/rcm.c:692
#8 0x0000000100766ffb in RSTR_NewPage (resolutiony=200, Page=0x1030010c0) at /Users/selead/Downloads/cuneiform-linux-1.0.0 2/cuneiform_src/Kern/rstr/src/rcm.c:1929
#9 0x000000010002c630 in RecognizeSetup (language=0) at /Users/selead/Downloads/cuneiform-linux-1.0.0 2/cuneiform_src/Kern/puma/c/partrecog.cpp:159
#10 0x000000010002cc80 in Recognize () at /Users/selead/Downloads/cuneiform-linux-1.0.0 2/cuneiform_src/Kern/puma/c/partrecog.cpp:557
#11 0x000000010002e7a8 in PUMA_XFinalRecognition () at /Users/selead/Downloads/cuneiform-linux-1.0.0 2/cuneiform_src/Kern/puma/main/puma.cpp:594
#12 0x000000010001034e in main (argc=4, argv=0x7fff5fbff5b0) at /Users/selead/Downloads/cuneiform-linux-1.0.0 2/cuneiform_src/cli/cuneiform-cli.cpp:392
(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x7fff83dd1160 to 0x7fff83dd11a0:
0x00007fff83dd1160 <sysctlbyname+156>: mov -0x18(%rbp),%r13
0x00007fff83dd1164 <sysctlbyname+160>: mov -0x10(%rbp),%r14
0x00007fff83dd1168 <sysctlbyname+164>: mov -0x8(%rbp),%r15
0x00007fff83dd116c <sysctlbyname+168>: leaveq
0x00007fff83dd116d <sysctlbyname+169>: retq
0x00007fff83dd116e <sysctlbyname+170>: nop
0x00007fff83dd116f <sysctlbyname+171>: nop
0x00007fff83dd1170 <strlen+0>: pxor %xmm0,%xmm0
0x00007fff83dd1174 <strlen+4>: mov %edi,%ecx
0x00007fff83dd1176 <strlen+6>: mov %rdi,%rdx
0x00007fff83dd1179 <strlen+9>: and $0xfffffffffffffff0,%rdi
0x00007fff83dd117d <strlen+13>: or $0xffffffffffffffff,%eax
0x00007fff83dd1180 <strlen+16>: pcmpeqb (%rdi),%xmm0
0x00007fff83dd1184 <strlen+20>: and $0xf,%ecx
0x00007fff83dd1187 <strlen+23>: shl %cl,%eax
0x00007fff83dd1189 <strlen+25>: pmovmskb %xmm0,%ecx
0x00007fff83dd118d <strlen+29>: and %eax,%ecx
0x00007fff83dd118f <strlen+31>: je 0x7fff83dd119b <strlen+43>
0x00007fff83dd1191 <strlen+33>: bsf %ecx,%eax
0x00007fff83dd1194 <strlen+36>: sub %rdx,%rdi
0x00007fff83dd1197 <strlen+39>: add %rdi,%rax
0x00007fff83dd119a <strlen+42>: retq
0x00007fff83dd119b <strlen+43>: pxor %xmm0,%xmm0
0x00007fff83dd119f <strlen+47>: add $0x10,%rdi
End of assembler dump.
(gdb) info all-registers
rax 0xffffffff 4294967295
rbx 0x7fff83ddaf88 140735405731720
rcx 0x3000350 50332496
rdx 0x3000350 50332496
rsi 0xffffffff 4294967295
rdi 0x3000350 50332496
rbp 0x7fff5fbfe3c0 0x7fff5fbfe3c0
rsp 0x7fff5fbfdaa8 0x7fff5fbfdaa8
r8 0x3000350 50332496
r9 0x7fff5fbfe850 140734799800400
r10 0x100a9aaa7 4306086567
r11 0x7fff5fbfe4d8 140734799799512
r12 0x0 0
r13 0x3000350 50332496
r14 0x7fff5fbfdd90 140734799797648
r15 0x0 0
rip 0x7fff83dd1180 0x7fff83dd1180 <strlen+16>
eflags 0x10286 66182
cs 0x27 39
ss 0x0 0
ds 0x0 0
es 0x0 0
fs 0x70 112
gs 0x48 72
st0 0 (raw 0x00000000000000000000)
st1 0 (raw 0x00000000000000000000)
st2 0 (raw 0x00000000000000000000)
st3 0 (raw 0x00000000000000000000)
st4 1 (raw 0x3fff8000000000000000)
st5 1 (raw 0x3fff8000000000000000)
st6 0 (raw 0x00000000000000000000)
st7 11.090354888959124950859047586959605 (raw 0x4002b17217f7d1cf79ac)
fctrl 0x37f 895
fstat 0x20 32
ftag 0xffff 65535
fiseg 0x27 39
fioff 0x83e004d2 -2082470702
foseg 0x1f 31
fooff 0x5fbfe248 1606410824
fop 0x51c 1308
xmm0 {
  v4_float = {0, 0, 0, 0},
  v2_double = {0, 0},
  v16_int8 = {0 <repeats 16 times>},
  v8_int16 = {0, 0, 0, 0, 0, 0, 0, 0},
  v4_int32 = {0, 0, 0, 0},
  v2_int64 = {0, 0},
  uint128 = 0
} (raw 0x00000000000000000000000000000000)
xmm1 {
  v4_float = {-nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff), -nan(0x7fff00)},
  v2_double = {-nan(0xfffffffffffff), -nan(0xfffffffffff00)},
  v16_int8 = {-1 <repeats 15 times>, 0},
  v8_int16 = {-1, -1, -1, -1, -1, -1, -1, -256},
  v4_int32 = {-1, -1, -1, -256},
  v2_int64 = {-1, -256},
  uint128 = 0xffffffffffffffffffffffffffffff00
} (raw 0x00ffffffffffffffffffffffffffffff)
xmm2 {
  v4_float = {0, 0, 0, 0},
  v2_double = {0, 0},
  v16_int8 = {0 <repeats 16 times>},
  v8_int16 = {0, 0, 0, 0, 0, 0, 0, 0},
  v4_int32 = {0, 0, 0, 0},
  v2_int64 = {0, 0},
  uint128 = 0
} (raw 0x00000000000000000000000000000000)
xmm3 {
  v4_float = {0, 0, 0, 0},
  v2_double = {0, 0},
  v16_int8 = {0 <repeats 16 times>},
  v8_int16 = {0, 0, 0, 0, 0, 0, 0, 0},
  v4_int32 = {0, 0, 0, 0},
  v2_int64 = {0, 0},
  uint128 = 0
} (raw 0x00000000000000000000000000000000)
xmm4 {
  v4_float = {0, 0, 0, 0},
  v2_double = {0, 0},
  v16_int8 = {0 <repeats 16 times>},
  v8_int16 = {0, 0, 0, 0, 0, 0, 0, 0},
  v4_int32 = {0, 0, 0, 0},
  v2_int64 = {0, 0},
  uint128 = 0
} (raw 0x00000000000000000000000000000000)
xmm5 {
  v4_float = {0, 0, 1.47799993, -8.06646435e-20},
  v2_double = {0, 0.114},
  v16_int8 = {0, 0, 0, 0, 0, 0, 0, 0, 63, -67, 47, 26, -97, -66, 118, -55},
  v8_int16 = {0, 0, 0, 0, 16317, 12058, -24642, 30409},
  v4_int32 = {0, 0, 1069362970, -1614907703},
  v2_int64 = {0, 4592878986383488713},
  uint128 = 14517000039423786303
} (raw 0xc976be9f1a2fbd3f0000000000000000)
xmm6 {
  v4_float = {0, 0, 0, 0},
  v2_double = {0, 0},
  v16_int8 = {0 <repeats 16 times>},
  v8_int16 = {0, 0, 0, 0, 0, 0, 0, 0},
  v4_int32 = {0, 0, 0, 0},
  v2_int64 = {0, 0},
  uint128 = 0
} (raw 0x00000000000000000000000000000000)
xmm7 {
  v4_float = {0, 0, 5.06518555, 0},
  v2_double = {0, 2315},
  v16_int8 = {0, 0, 0, 0, 0, 0, 0, 0, 64, -94, 22, 0, 0, 0, 0, 0},
  v8_int16 = {0, 0, 0, 0, 16546, 5632, 0, 0},
  v4_int32 = {0, 0, 1084364288, 0},
  v2_int64 = {0, 4657309153910325248},
  uint128 = 1483328
} (raw 0x000000000016a2400000000000000000)
xmm8 {
  v4_float = {0, 0, 5.06518555, 0},
  v2_double = {0, 2315},
  v16_int8 = {0, 0, 0, 0, 0, 0, 0, 0, 64, -94, 22, 0, 0, 0, 0, 0},
  v8_int16 = {0, 0, 0, 0, 16546, 5632, 0, 0},
  v4_int32 = {0, 0, 1084364288, 0},
  v2_int64 = {0, 4657309153910325248},
  uint128 = 1483328
} (raw 0x000000000016a2400000000000000000)
xmm9 {
  v4_float = {0, 0, 5.06518555, 0},
  v2_double = {0, 2315},
  v16_int8 = {0, 0, 0, 0, 0, 0, 0, 0, 64, -94, 22, 0, 0, 0, 0, 0},
  v8_int16 = {0, 0, 0, 0, 16546, 5632, 0, 0},
  v4_int32 = {0, 0, 1084364288, 0},
  v2_int64 = {0, 4657309153910325248},
  uint128 = 1483328
} (raw 0x000000000016a2400000000000000000)
xmm10 {
  v4_float = {0, 0, 0, 0},
  v2_double = {0, 0},
  v16_int8 = {0 <repeats 16 times>},
  v8_int16 = {0, 0, 0, 0, 0, 0, 0, 0},
  v4_int32 = {0, 0, 0, 0},
  v2_int64 = {0, 0},
  uint128 = 0
} (raw 0x00000000000000000000000000000000)
xmm11 {
  v4_float = {0, 0, 0, 0},
  v2_double = {0, 0},
  v16_int8 = {0 <repeats 16 times>},
  v8_int16 = {0, 0, 0, 0, 0, 0, 0, 0},
  v4_int32 = {0, 0, 0, 0},
  v2_int64 = {0, 0},
  uint128 = 0
} (raw 0x00000000000000000000000000000000)
xmm12 {
  v4_float = {0, 0, 0, 0},
  v2_double = {0, 0},
  v16_int8 = {0 <repeats 16 times>},
  v8_int16 = {0, 0, 0, 0, 0, 0, 0, 0},
  v4_int32 = {0, 0, 0, 0},
  v2_int64 = {0, 0},
  uint128 = 0
} (raw 0x00000000000000000000000000000000)
xmm13 {
  v4_float = {0, 0, 0, 0},
  v2_double = {0, 0},
  v16_int8 = {0 <repeats 16 times>},
  v8_int16 = {0, 0, 0, 0, 0, 0, 0, 0},
  v4_int32 = {0, 0, 0, 0},
  v2_int64 = {0, 0},
  uint128 = 0
} (raw 0x00000000000000000000000000000000)
xmm14 {
  v4_float = {0, 0, 0, 0},
  v2_double = {0, 0},
  v16_int8 = {0 <repeats 16 times>},
  v8_int16 = {0, 0, 0, 0, 0, 0, 0, 0},
  v4_int32 = {0, 0, 0, 0},
  v2_int64 = {0, 0},
  uint128 = 0
} (raw 0x00000000000000000000000000000000)
xmm15 {
  v4_float = {0, 0, 0, 0},
  v2_double = {0, 0},
  v16_int8 = {0 <repeats 16 times>},
  v8_int16 = {0, 0, 0, 0, 0, 0, 0, 0},
  v4_int32 = {0, 0, 0, 0},
  v2_int64 = {0, 0},
  uint128 = 0
} (raw 0x00000000000000000000000000000000)
mxcsr 0x1fa1 8097
(gdb)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.