Hi,

[Cc: Jim Bender.]

I can reproduce the problem:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (define sxml '(*TOP* (*PI* xml "version=\"1.0\" 
encoding=\"UTF-8\"") (note "
    " (to "Tove") "
    " (from "Jani") "
    " (heading "Reminder") "
    " (body "Don't forget me this weekend!") "
")))
scheme@(guile-user)> (sxml-match (car ((sxpath '(note to)) sxml)) ((to ,cv) 
(list cv)) (,_ #f))
$7 = ("Tove")
--8<---------------cut here---------------end--------------->8---

So far so good, but then:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (define x (sxml-match '(to "Trove") ((to ,cv) (list cv)) 
(,_ #f)))
module/ice-9/boot-9.scm:1514:2: In procedure #<procedure 24d4140 at 
module/ice-9/boot-9.scm:1515:2 (module)>:
module/ice-9/boot-9.scm:1514:2: Throw to key `vm-error' with args `(vm-run "VM: 
Stack overflow" ())'.

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
--8<---------------cut here---------------end--------------->8---

(And Guile crashes upon ,bt.)

Removing the catch-all clause makes the problem vanish:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (define x (sxml-match '(to "Trove") ((to ,cv) (list cv))))
scheme@(guile-user)> x
$4 = ("Trove")
--8<---------------cut here---------------end--------------->8---

So that looks like a real bug, needing further investigation...

Thanks,
Ludo’.

Reply via email to