What steps will reproduce the problem?
1.Load a file containing the following:
(define-syntax symbol??
(syntax-rules ()
((symbol?? (x . y) kt kf) kf) ; It's a pair, not a symbol
((symbol?? #(x ...) kt kf) kf) ; It's a vector, not a symbol
((symbol?? maybe-symbol kt kf)
(let-syntax
((test
(syntax-rules ()
((test maybe-symbol t f) t)
((test x t f) f))))
(test abracadabra kt kf)))))
What is the expected output? What do you see instead?
The expected output is another prompt; instead I see "Process scheme
segmentation fault"
Here's a bit of info from gdb:
06:43:33 [erich@flap chibi-scheme]$ gdb ./chibi-scheme
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) run
Starting program: /usr/local/src/chibi-scheme/chibi-scheme
/usr/local/src/chibi-scheme/chibi-scheme: error while loading shared
libraries: libchibi-scheme.so: cannot open shared object file: No such file
or directory
Program exited with code 0177.
(gdb) setenv LD_LIBRARY_PATH=/usr/local/src/chibi-scheme/
Undefined command: "setenv". Try "help".
(gdb) set env LD_LIBRARY_PATH=/usr/local/src/chibi-scheme/
(gdb) run
Starting program: /usr/local/src/chibi-scheme/chibi-scheme
> (load "/home/erich/doodles/anagrams/scheme/chibi/assert.ss")
Program received signal SIGSEGV, Segmentation fault.
0xb7f35f1e in ?? () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0 0xb7f35f1e in ?? () from /lib/tls/i686/cmov/libc.so.6
#1 0xb7f36ee6 in realloc () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7f36e22 in realloc () from /lib/tls/i686/cmov/libc.so.6
#3 0xb7f2aaca in ?? () from /lib/tls/i686/cmov/libc.so.6
#4 0xb7f21f69 in fclose () from /lib/tls/i686/cmov/libc.so.6
#5 0xb8051189 in sexp_close_port (ctx=0xb7d3ec60, port=0xb7d3ffa0) at
eval.c:1876
#6 0xb804d44e in sexp_vm (ctx=0xb7d3ec60, proc=0xb7d3ce50) at eval.c:1405
#7 0xb8052623 in sexp_apply (ctx=0xb7d3ec60, proc=0xb7d3ce50,
args=0xb7d3ec50) at eval.c:2113
#8 0xb804abcb in analyze (ctx=0xb7d3d5e0, object=0xb7d3e710) at eval.c:725
#9 0xb8052741 in sexp_compile (ctx=0xb7d3d5e0, x=0xb7d3e710) at eval.c:2125
#10 0xb8052885 in sexp_eval (ctx=0xb7d3d5e0, obj=0xb7d3e710) at eval.c:2146
#11 0xb804a29f in analyze_bind_syntax (ls=0xb7d3ec20, eval_ctx=0xb7d3d5e0,
bind_ctx=0xb7d3d5e0)
at eval.c:606
#12 0xb804a420 in analyze_define_syntax (ctx=0xb7d3d5e0, x=0xb7d3e6b0) at
eval.c:627
#13 0xb804aab4 in analyze (ctx=0xb7d3d5e0, object=0xb7d3e6b0) at eval.c:711
#14 0xb8052741 in sexp_compile (ctx=0xb7d3d5e0, x=0xb7d3e6b0) at eval.c:2125
#15 0xb8052885 in sexp_eval (ctx=0xb7d3d5e0, obj=0xb7d3e6b0) at eval.c:2146
#16 0xb8051428 in sexp_load (ctx=0xb7c9e4d0, source=0xb7d3d410,
env=0xb7c9f510) at eval.c:1914
#17 0xb804d4ea in sexp_vm (ctx=0xb7c9e4d0, proc=0xb7d3d5a0) at eval.c:1411
#18 0xb8052623 in sexp_apply (ctx=0xb7c9e4d0, proc=0xb7d3d5a0, args=0xe) at
eval.c:2113
#19 0xb80528f4 in sexp_eval (ctx=0xb7c9e4d0, obj=0xb7d3d400) at eval.c:2154
#20 0x08048c5b in repl (ctx=0xb7c9e4d0) at main.c:72
#21 0x08049051 in run_main (argc=1, argv=0xbf87d154) at main.c:140
#22 0x08049086 in main (argc=1, argv=0xbf87d154) at main.c:149
(gdb) up
#1 0xb7f36ee6 in realloc () from /lib/tls/i686/cmov/libc.so.6
(gdb)
#2 0xb7f36e22 in realloc () from /lib/tls/i686/cmov/libc.so.6
(gdb)
#3 0xb7f2aaca in ?? () from /lib/tls/i686/cmov/libc.so.6
(gdb)
#4 0xb7f21f69 in fclose () from /lib/tls/i686/cmov/libc.so.6
(gdb)
#5 0xb8051189 in sexp_close_port (ctx=0xb7d3ec60, port=0xb7d3ffa0) at
eval.c:1876
1876 fclose(sexp_port_stream(port));
(gdb) p port
$1 = (sexp) 0xb7d3ffa0
(gdb) p *port
$2 = {tag = 12 '\f', immutablep = 0 '\0', gc_mark = 0 '\0', value = {
flonum = 1.61046678963788e-267, type = {tag = 240 '', field_base = 2186,
field_len_base = -27032, field_len_off = 2186, field_len_scale = 0,
size_base = 0,
size_off = 1, size_scale = 0, name = 0x1 <Address 0x1 out of
bounds>}, pair = {
car = 0x88a94f0, cdr = 0x88a9668, source = 0x0}, vector = {length =
143299824,
data = 0xb7d3ffa8}, string = {length = 143299824, data = 0xb7d3ffa8
"h\226\212\b"},
symbol = {string = 0x88a94f0}, port = {stream = 0x88a94f0, buf =
0x88a9668 "1", offset = 0,
line = 1, size = 1, openp = 1, sourcep = 1, name = 0x1e, cookie =
0x4e}, exception = {
kind = 0x88a94f0, message = 0x88a9668, irritants = 0x0, procedure =
0x1, source = 0x1},
bignum = {sign = -16 '', length = 143300200, data = 0xb7d3ffac}, env =
{flags = -16 '',
parent = 0x88a9668, lambda = 0x0, bindings = 0x1}, bytecode = {length
= 143299824,
name = 0x88a9668, literals = 0x0, data = 0xb7d3ffb0 "\001"},
procedure = {flags = -16 '',
num_args = 2186, bc = 0x88a9668, vars = 0x0}, macro = {proc =
0x88a94f0, env = 0x88a9668},
synclo = {env = 0x88a94f0, free_vars = 0x88a9668, expr = 0x0}, opcode =
{op_class = 240 '',
code = 148 '\224', num_args = 138 '\212', flags = 8 '\b', arg1_type =
104 'h',
arg2_type = 150 '\226', inverse = 138 '\212', name = 0x0, data = 0x1,
dflt = 0x1,
proc = 0x1}, core = {code = -16 '', name = 0x88a9668 "1"}, lambda =
{name = 0x88a94f0,
params = 0x88a9668, locals = 0x0, defs = 0x1, flags = 0x1, fv = 0x1,
sv = 0x1,
body = 0x1e}, cnd = {test = 0x88a94f0, pass = 0x88a9668, fail = 0x0},
set = {
var = 0x88a94f0, value = 0x88a9668}, ref = {name = 0x88a94f0, cell =
0x88a9668}, seq = {
ls = 0x88a94f0}, lit = {value = 0x88a94f0}, stack = {length =
143299824, top = 143300200,
data = 0xb7d3ffac}, context = {saves = 0x88a94f0, pos = 143300200,
depth = 0, tailp = 1,
tracep = 1, bc = 0x1, lambda = 0x1, stack = 0x1e, env = 0x4e, fv =
0x0, parent = 0x0}}}
(gdb) quit
What version of the product are you using? On what operating system?
changeset: 153:e8871a9d12f8 on Ubuntu 9.04 ("Jaunty Jackalope") 32-bit x86