nandub/gale — Issue #1: Segmentation fault on gsend
Author: nandub
Created: 2012-02-10 06:35:27+00:00
State: open

00:28:25 fortiz@Fernandos-MacBook-Pro:~/gale-fix
$ bin/gsub
Segmentation fault: 11
00:28:25 fortiz@Fernandos-MacBook-Pro:~/gale-fix
$ gdb bin/gsub
GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 8 20:32:45 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ........... done

(gdb) run
Starting program: /Users/fortiz/gale-fix/bin/gsub
Reading symbols for shared libraries ++++++++++.......................... done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000008
0x0000000100082620 in GC_generic_malloc_many ()
(gdb) backtrace
#0 0x0000000100082620 in GC_generic_malloc_many ()
#1 0x000000010008ac9c in GC_malloc ()
#2 0x000000010001e512 in gale_text_to_ascii [inlined] () at /Users/fortiz/development/tools/gale-0.99fruit/libgale/misc_charset.c:69
#3 0x000000010001e512 in gale_text_to (e=0x0) at misc_charset.c:163
#4 0x0000000100020169 in gale_var () at misc_envvar.c:26
#5 0x000000010000d403 in gale_init (s=0x100005d87 "gsub", argc=1, argv=0x7fff5fbff360) at core_init.c:103
#6 0x00000001000013fb in main (argc=1606415168, argv=0x7fff5fbff340) at gsub.c:727
(gdb) frame 2
#2 0x000000010001e512 in gale_text_to_ascii [inlined] () at /Users/fortiz/development/tools/gale-0.99fruit/libgale/misc_charset.c:69
69	pch = gale_malloc(text.l + 1);
(gdb) print buf
$1 = 0x0
(gdb)