[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #32365] psyntax error has bad format, causes exception during error
From: |
Mike Gran |
Subject: |
[bug #32365] psyntax error has bad format, causes exception during error |
Date: |
Sat, 05 Feb 2011 16:36:34 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20110103 Fedora/3.6.13-1.fc14 Firefox/3.6.13 |
URL:
<http://savannah.gnu.org/bugs/?32365>
Summary: psyntax error has bad format, causes exception
during error
Project: Guile
Submitted by: mike121
Submitted on: Sat 05 Feb 2011 04:36:33 PM GMT
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Hello-
When I load a file from the REPL that contains the following snippet, I get
an exception during the display of an error. (The error-within-an-error
doesn't occur when compiling the file or running it as "guile -s tmperr.scm")
(define-syntax inner
(syntax-rules ()
((inner func test-id var1)
#t)))
(define-syntax outer
(lambda (x) (inner func x)))
(outer "test-id" var1 var2)
Running the above returns
module/ice-9/psyntax.scm:1303:31: In procedure chi-macro:
module/ice-9/psyntax.scm:1303:31: source expression failed to match any
pattern
Exception during displaying of error: misc-error
The error-within-an-error that it's complaining about is "superfluous
arguments" during a call to scm_simple_format() by display_error_message().
display_error_message has been passed a message string
"source expression failed to match any pattern"
that doesn't have an ~A's for arguments, but, three arguments have been
passed to the error message printer
((line . 7) (column . 14) (filename . "tmperr.scm"))
Here's the Guile backtrace
6 (primitive-load "tmperr.scm")
No local variables.
In module/ice-9/eval.scm:
458:12 5 (#<procedure 7bd580 at module/ice-9/eval.scm:452:4 (exp)>
(define-syntax outer (lambda (x) (inner func x))))
Local variables:
$59 = exp = (define-syntax outer (lambda (x) (inner func x)))
In module/ice-9/psyntax.scm:
1130:47 4 (chi-top (define-syntax outer (lambda (x) (inner func x))) ()
((top)) e (eval) (hygiene guile-user))
Local variables:
$60 = e = (define-syntax outer (lambda (x) (inner func x)))
$61 = r = ()
$62 = w = ((top))
$63 = m = e
$64 = esew = (eval)
$65 = mod = (hygiene guile-user)
$66 = type = define-syntax-form
$67 = value = outer
$68 = e = (lambda (x) (inner func x))
$69 = w = ((top))
$70 = s = ((line . 6) (column . 0) (filename . "tmperr.scm"))
$71 = mod = (hygiene guile-user)
$72 = n = outer
$73 = r = ()
1507:11 3 (chi-simple-lambda (lambda (x) (inner func x)) () ((top)) ((line
. 7) (column . 2) (filename . "tmperr.scm")) (hygiene guile-user) (x) …)
Local variables:
$74 = e = (lambda (x) (inner func x))
$75 = r = ()
$76 = w = ((top))
$77 = s = ((line . 7) (column . 2) (filename . "tmperr.scm"))
$78 = mod = (hygiene guile-user)
$79 = req = (x)
$80 = rest = #f
$81 = meta = ()
$82 = body = ((inner func x))
$83 = ids = (x)
$84 = vars = (#{x\ 124}#)
$85 = labels = ("i125")
1356:33 2 (parse (((("placeholder" placeholder) ("i125" lexical . #{x\
124}#)) . #(syntax-object (inner func x) ((top) #(ribcage () # …) …)
…))) …)
Local variables:
$86 = body = (((("placeholder" placeholder) ("i125" lexical . #{x\
124}#)) . #(syntax-object (inner func x) ((top) #(ribcage () () ()) #)
(…))))
$87 = ids = ()
$88 = labels = ()
$89 = var-ids = ()
$90 = vars = ()
$91 = vals = ()
$92 = bindings = ()
$93 = e = #(syntax-object (inner func x) ((top) #(ribcage () () ())
#(ribcage #(x) #((top)) #("i125"))) (hygiene guile-user))
$94 = er = (("placeholder" placeholder) ("i125" lexical . #{x\ 124}#))
1007:32 1 (syntax-type (inner func x) (("placeholder" placeholder) ("i125"
lexical . #{x\ 124}#)) ((top) #(ribcage () () ()) #(ribcage #(x) …)) …)
Local variables:
$95 = e = (inner func x)
$96 = r = (("placeholder" placeholder) ("i125" lexical . #{x\ 124}#))
$97 = w = ((top) #(ribcage () () ()) #(ribcage #(x) #((top))
#("i125")))
$98 = s = ((line . 7) (column . 14) (filename . "tmperr.scm"))
$99 = rib = #(ribcage () () ())
$100 = mod = (hygiene guile-user)
$101 = for-car? = #f
$102 = first = inner
$103 = ftype = macro
$104 = fval = #<procedure 1588a80 at module/ice-9/eval.scm:378:13 (a)>
$105 = fe = inner
$106 = fw = ((top) #(ribcage () () ()) #(ribcage #(x) #((top))
#("i125")))
$107 = fs = ((line . 7) (column . 14) (filename . "tmperr.scm"))
$108 = fmod = (hygiene guile-user)
1303:30 0 (chi-macro #<procedure 1588a80 at module/ice-9/eval.scm:378:13
(a)> (inner func x) (("placeholder" placeholder) ("i125" lexical . #)) …)
Local variables:
$109 = p = #<procedure 1588a80 at module/ice-9/eval.scm:378:13 (a)>
$110 = e = (inner func x)
$111 = r = (("placeholder" placeholder) ("i125" lexical . #{x\ 124}#))
$112 = w = ((top) #(ribcage () () ()) #(ribcage #(x) #((top))
#("i125")))
$113 = s = ((line . 7) (column . 14) (filename . "tmperr.scm"))
$114 = rib = #(ribcage () () ())
$115 = mod = (hygiene guile-user)
$116 = rebuild-macro-output = #<procedure rebuild-macro-output (x m)>
And here's the C backtracr
#0 scm_ithrow (key=0x7662e0, args=0x342d020, noreturn=1) at throw.c:507
#1 0x00007ffff7c95b10 in scm_error_scm (key=0x7662e0, subr=0x341b120,
message=0x341b140, args=0x342d060, data=0x4) at error.c:94
#2 0x00007ffff7c95ac1 in scm_error (key=0x7662e0, subr=0x7ffff7d87540
"simple-format", message=0x7ffff7d875c8 "FORMAT: ~A superfluous arguments",
args=0x342d060,
rest=0x4) at error.c:61
#3 0x00007ffff7c960ad in scm_misc_error (subr=0x7ffff7d87540
"simple-format", message=0x7ffff7d875c8 "FORMAT: ~A superfluous arguments",
args=0x342d060) at error.c:315
#4 0x00007ffff7ced6d1 in scm_simple_format (destination=0x342d0b0,
message=0x8bf7a0, args=0x3422890) at print.c:1345
#5 0x00007ffff7c8043f in display_error_message (d=0x7fffffff91f0) at
backtrace.c:118
#6 0x00007ffff7c94442 in scm_internal_dynamic_wind (before=0x7ffff7c80472
<before_display_error_message>, inner=0x7ffff7c803e5 <display_error_message>,
after=0x7ffff7c804df <after_display_error_message>,
inner_data=0x7fffffff91f0, guard_data=0x7fffffff91f0) at dynwind.c:83
#7 0x00007ffff7c805c5 in scm_display_error_message (message=0x8bf7a0,
args=0x3422890, port=0x342d0b0) at backtrace.c:161
#8 0x00007ffff7c807df in display_error_body (a=0x7fffffffa290) at
backtrace.c:214
#9 0x00007ffff7d2a533 in apply_catch_closure (clo=0x341b480, args=0x304) at
throw.c:146
#10 0x00007ffff7d46fc2 in vm_debug_engine (vm=0x7b2d40, program=0x341b360,
argv=0x7fffffffa0d8, nargs=1) at vm-i-system.c:942
#11 0x00007ffff7d56908 in scm_c_vm_run (vm=0x7b2d40, program=0x7b5cc0,
argv=0x7fffffffa0c0, nargs=3) at vm.c:565
#12 0x00007ffff7c98021 in scm_call_3 (proc=0x7b5cc0, arg1=0x404,
arg2=0x341b480, arg3=0x341b460) at eval.c:466
#13 0x00007ffff7d2a146 in scm_catch (key=0x404, thunk=0x341b480,
handler=0x341b460) at throw.c:73
#14 0x00007ffff7d2a187 in scm_catch_with_pre_unwind_handler (key=0x404,
thunk=0x341b480, handler=0x341b460, pre_unwind_handler=0x904) at throw.c:81
#15 0x00007ffff7d2a613 in scm_c_catch (tag=0x404, body=0x7ffff7c806a3
<display_error_body>, body_data=0x7fffffffa290, handler=0x7ffff7c807eb
<display_error_handler>,
handler_data=0x7fffffffa280, pre_unwind_handler=0,
pre_unwind_handler_data=0x0) at throw.c:213
#16 0x00007ffff7d2a667 in scm_internal_catch (tag=0x404, body=0x7ffff7c806a3
<display_error_body>, body_data=0x7fffffffa290,
handler=0x7ffff7c807eb <display_error_handler>,
handler_data=0x7fffffffa280) at throw.c:222
#17 0x00007ffff7c8099d in scm_i_display_error (frame=0x34221b0,
port=0x3429580, subr=0x4, message=0x8bf7a0, args=0x3422890, rest=0x3422710) at
backtrace.c:272
#18 0x00007ffff7c80a3f in scm_display_error (frame=0x34221b0, port=0x3429580,
subr=0x4, message=0x8bf7a0, args=0x3422890, rest=0x3422710) at
backtrace.c:291
#19 0x00007ffff7d46a25 in vm_debug_engine (vm=0x7b2d40,
program=0x7ffff7fcf528, argv=0x7fffffffb0f8, nargs=6) at vm-i-system.c:889
#20 0x00007ffff7d56908 in scm_c_vm_run (vm=0x7b2d40, program=0x341b5e0,
argv=0x7fffffffb0f0, nargs=1) at vm.c:565
#21 0x00007ffff7c97f83 in scm_call_1 (proc=0x341b5e0, arg1=0x3429580) at
eval.c:452
#22 0x00007ffff7d2251e in scm_call_with_output_string (proc=0x341b5e0) at
strports.c:402
#23 0x00007ffff7d46875 in vm_debug_engine (vm=0x7b2d40,
program=0x7ffff7fe6908, argv=0x7fffffffbf20, nargs=1) at vm-i-system.c:874
#24 0x00007ffff7d56908 in scm_c_vm_run (vm=0x7b2d40, program=0x7bd580,
argv=0x7fffffffbf18, nargs=1) at vm.c:565
#25 0x00007ffff7c98d61 in scm_primitive_eval (exp=0x3422c90) at eval.c:735
#26 0x00007ffff7cc3048 in scm_primitive_load (filename=0x3418dc0) at
load.c:126
#27 0x00007ffff7d46875 in vm_debug_engine (vm=0x7b2d40,
program=0x7ffff7fd67c0, argv=0x7fffffffcd60, nargs=1) at vm-i-system.c:874
#28 0x00007ffff7d56908 in scm_c_vm_run (vm=0x7b2d40, program=0x7bd580,
argv=0x7fffffffcd58, nargs=1) at vm.c:565
#29 0x00007ffff7c98d61 in scm_primitive_eval (exp=0x8ddc10) at eval.c:735
#30 0x00007ffff7c98e1b in scm_eval (exp=0x8ddc10, module_or_state=0x7e2f30)
at eval.c:769
#31 0x00007ffff7cfc07c in scm_shell (argc=1, argv=0x7fffffffe108) at
script.c:837
#32 0x0000000000400a08 in inner_main (closure=0x0, argc=1,
argv=0x7fffffffe108) at guile.c:60
#33 0x00007ffff7cba5a7 in invoke_main_func (body_data=0x7fffffffdfc0) at
init.c:384
#34 0x00007ffff7c8ed10 in c_body (d=0x7fffffffde60) at continuations.c:473
#35 0x00007ffff7d2a533 in apply_catch_closure (clo=0x888100, args=0x304) at
throw.c:146
#36 0x00007ffff7d348a7 in vm_regular_engine (vm=0x7b2d40, program=0x8b73a0,
argv=0x7fffffffdcf0, nargs=1) at vm-i-system.c:942
#37 0x00007ffff7d56908 in scm_c_vm_run (vm=0x7b2d40, program=0x7b5cc0,
argv=0x7fffffffdcd0, nargs=4) at vm.c:565
#38 0x00007ffff7c98082 in scm_call_4 (proc=0x7b5cc0, arg1=0x404,
arg2=0x888100, arg3=0x8880c0, arg4=0x888080) at eval.c:473
#39 0x00007ffff7d2a201 in scm_catch_with_pre_unwind_handler (key=0x404,
thunk=0x888100, handler=0x8880c0, pre_unwind_handler=0x888080) at throw.c:86
#40 0x00007ffff7d2a613 in scm_c_catch (tag=0x404, body=0x7ffff7c8ece8
<c_body>, body_data=0x7fffffffde60, handler=0x7ffff7c8ed1f <c_handler>,
handler_data=0x7fffffffde60, pre_unwind_handler=0x7ffff7d2adde
<scm_handle_by_message_noexit>, pre_unwind_handler_data=0x0) at throw.c:213
#41 0x00007ffff7c8ecbb in scm_i_with_continuation_barrier
(body=0x7ffff7c8ece8 <c_body>, body_data=0x7fffffffde60,
handler=0x7ffff7c8ed1f <c_handler>,
handler_data=0x7fffffffde60, pre_unwind_handler=0x7ffff7d2adde
<scm_handle_by_message_noexit>, pre_unwind_handler_data=0x0) at
continuations.c:450
#42 0x00007ffff7c8ed9b in scm_c_with_continuation_barrier
(func=0x7ffff7cba54f <invoke_main_func>, data=0x7fffffffdfc0) at
continuations.c:491
#43 0x00007ffff7d273f6 in scm_i_with_guile_and_parent (func=0x7ffff7cba54f
<invoke_main_func>, data=0x7fffffffdfc0, parent=0x0) at threads.c:794
#44 0x00007ffff7d2729f in scm_with_guile (func=0x7ffff7cba54f
<invoke_main_func>, data=0x7fffffffdfc0) at threads.c:754
#45 0x00007ffff7cba530 in scm_boot_guile (argc=1, argv=0x7fffffffe108,
main_func=0x4009e4 <inner_main>, closure=0x0) at init.c:367
#46 0x0000000000400a35 in main (argc=1, argv=0x7fffffffe108) at guile.c:70
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?32365>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #32365] psyntax error has bad format, causes exception during error,
Mike Gran <=