go-aspell icon indicating copy to clipboard operation
go-aspell copied to clipboard

crash of go program with no dictionary installed

Open brettowe opened this issue 9 years ago • 1 comments

was getting a crash as listed below trying to use this and i traced it down to fact there was no dictionary installed the code around where it crashed should be speller, err = aspell.NewSpeller(map[string]string{ "lang": "en_US", }) if err != nil { fmt.Errorf("Error: %s", err.Error()) *fakeWords = false } defer speller.Delete()

so even with the error check its doing the below

*** Error in `./markov': double free or corruption (fasttop): 0x0000000002a74720 *** ======= Backtrace: ========= /usr/lib/libc.so.6(+0x71bad)[0x7ff68aa0abad] /usr/lib/libc.so.6(+0x770fe)[0x7ff68aa100fe] /usr/lib/libc.so.6(+0x778db)[0x7ff68aa108db] /usr/lib/libaspell.so.15(_ZN7acommon12CanHaveErrorD1Ev+0x20)[0x7ff68afa5a20] /usr/lib/libaspell.so.15(_ZN7acommon12CanHaveErrorD0Ev+0x9)[0x7ff68afa5a49] ./markov[0x441465] ======= Memory map: ======== 00400000-00846000 r-xp 00000000 00:30 293 /home/bret/testweb/cur/markov/markov 00a46000-00a64000 rw-p 00446000 00:30 293 /home/bret/testweb/cur/markov/markov 00a64000-00a80000 rw-p 00000000 00:00 0 02a62000-02a94000 rw-p 00000000 00:00 0 [heap] c000000000-c0000c2000 rw-p 00000000 00:00 0 c204f98000-c238680000 rw-p 00000000 00:00 0 7ff688cc1000-7ff688ef7000 rw-p 00000000 00:00 0 7ff688ef7000-7ff688ef8000 ---p 00000000 00:00 0 7ff688ef8000-7ff6896f8000 rw-p 00000000 00:00 0 [stack:16709] 7ff6896f8000-7ff6896f9000 ---p 00000000 00:00 0 7ff6896f9000-7ff689ef9000 rw-p 00000000 00:00 0 [stack:16708] 7ff689ef9000-7ff689f0f000 r-xp 00000000 00:11 242431 /usr/lib/libgcc_s.so.1 7ff689f0f000-7ff68a10e000 ---p 00016000 00:11 242431 /usr/lib/libgcc_s.so.1 7ff68a10e000-7ff68a10f000 rw-p 00015000 00:11 242431 /usr/lib/libgcc_s.so.1 7ff68a10f000-7ff68a212000 r-xp 00000000 00:11 241783 /usr/lib/libm-2.21.so 7ff68a212000-7ff68a411000 ---p 00103000 00:11 241783 /usr/lib/libm-2.21.so 7ff68a411000-7ff68a412000 r--p 00102000 00:11 241783 /usr/lib/libm-2.21.so 7ff68a412000-7ff68a413000 rw-p 00103000 00:11 241783 /usr/lib/libm-2.21.so 7ff68a413000-7ff68a585000 r-xp 00000000 00:11 242438 /usr/lib/libstdc++.so.6.0.21 7ff68a585000-7ff68a785000 ---p 00172000 00:11 242438 /usr/lib/libstdc++.so.6.0.21 7ff68a785000-7ff68a78f000 r--p 00172000 00:11 242438 /usr/lib/libstdc++.so.6.0.21 7ff68a78f000-7ff68a791000 rw-p 0017c000 00:11 242438 /usr/lib/libstdc++.so.6.0.21 7ff68a791000-7ff68a795000 rw-p 00000000 00:00 0 7ff68a795000-7ff68a798000 r-xp 00000000 00:11 241766 /usr/lib/libdl-2.21.so 7ff68a798000-7ff68a997000 ---p 00003000 00:11 241766 /usr/lib/libdl-2.21.so 7ff68a997000-7ff68a998000 r--p 00002000 00:11 241766 /usr/lib/libdl-2.21.so 7ff68a998000-7ff68a999000 rw-p 00003000 00:11 241766 /usr/lib/libdl-2.21.so 7ff68a999000-7ff68ab32000 r-xp 00000000 00:11 241737 /usr/lib/libc-2.21.so 7ff68ab32000-7ff68ad31000 ---p 00199000 00:11 241737 /usr/lib/libc-2.21.so 7ff68ad31000-7ff68ad35000 r--p 00198000 00:11 241737 /usr/lib/libc-2.21.so 7ff68ad35000-7ff68ad37000 rw-p 0019c000 00:11 241737 /usr/lib/libc-2.21.so 7ff68ad37000-7ff68ad3b000 rw-p 00000000 00:00 0 7ff68ad3b000-7ff68ad53000 r-xp 00000000 00:11 241757 /usr/lib/libpthread-2.21.so 7ff68ad53000-7ff68af52000 ---p 00018000 00:11 241757 /usr/lib/libpthread-2.21.so 7ff68af52000-7ff68af53000 r--p 00017000 00:11 241757 /usr/lib/libpthread-2.21.so 7ff68af53000-7ff68af54000 rw-p 00018000 00:11 241757 /usr/lib/libpthread-2.21.so 7ff68af54000-7ff68af58000 rw-p 00000000 00:00 0 7ff68af58000-7ff68b011000 r-xp 00000000 00:11 71956 /usr/lib/libaspell.so.15.1.5 7ff68b011000-7ff68b211000 ---p 000b9000 00:11 71956 /usr/lib/libaspell.so.15.1.5 7ff68b211000-7ff68b217000 r--p 000b9000 00:11 71956 /usr/lib/libaspell.so.15.1.5 7ff68b217000-7ff68b219000 rw-p 000bf000 00:11 71956 /usr/lib/libaspell.so.15.1.5 7ff68b219000-7ff68b220000 rw-p 00000000 00:00 0 7ff68b220000-7ff68b242000 r-xp 00000000 00:11 241779 /usr/lib/ld-2.21.so 7ff68b24c000-7ff68b417000 rw-p 00000000 00:00 0 7ff68b43e000-7ff68b441000 rw-p 00000000 00:00 0 7ff68b441000-7ff68b442000 r--p 00021000 00:11 241779 /usr/lib/ld-2.21.so 7ff68b442000-7ff68b443000 rw-p 00022000 00:11 241779 /usr/lib/ld-2.21.so 7ff68b443000-7ff68b444000 rw-p 00000000 00:00 0 7ffe579f2000-7ffe57a13000 rw-p 00000000 00:00 0 [stack] 7ffe57afc000-7ffe57afe000 r--p 00000000 00:00 0 [vvar] 7ffe57afe000-7ffe57b00000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] SIGABRT: abort PC=0x7ff68a9cc528 signal arrived during cgo execution

goroutine 1 [syscall, locked to thread]: runtime.cgocall_errno(0x4022b0, 0xc20807fbe8, 0xc200000000) /usr/lib/go/src/runtime/cgocall.go:130 +0xf5 fp=0xc20807fbc8 sp=0xc20807fba0 github.com/trustmaster/go-aspell._Cfunc_delete_aspell_can_have_error(0x2a745e0) /home/bret/golang/gopath/src/github.com/trustmaster/go-aspell/:130 +0x45 fp=0xc20807fbe8 sp=0xc20807fbc8 github.com/trustmaster/go-aspell.NewSpeller(0xc238078900, 0x0, 0x0, 0x0, 0x0) /home/bret/golang/gopath/src/github.com/trustmaster/go-aspell/aspell.go:77 +0x572 fp=0xc20807fd78 sp=0xc20807fbe8 main.main() /home/bret/testweb/cur/markov/markov.go:218 +0x882 fp=0xc20807ff98 sp=0xc20807fd78 runtime.main() /usr/lib/go/src/runtime/proc.go:63 +0xf3 fp=0xc20807ffe0 sp=0xc20807ff98 runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1 fp=0xc20807ffe8 sp=0xc20807ffe0

goroutine 17 [syscall, locked to thread]: runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1

rax 0x0 rbx 0x55 rcx 0x7ff68a9cc528 rdx 0x6 rdi 0x4143 rsi 0x4143 rbp 0x7ffe57a108f0 rsp 0x7ffe57a10558 r8 0x7ff68aaf6140 r9 0x0 r10 0x8 r11 0x202 r12 0x55 r13 0x7ffe57a10708 r14 0x7ffe57a10708 r15 0x2 rip 0x7ff68a9cc528 rflags 0x202 cs 0x33 fs 0x0 gs 0x0

brettowe avatar Jun 01 '15 03:06 brettowe