guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VM stack overflow while calling sxml-match within let* or car


From: Ludovic Courtès
Subject: Re: VM stack overflow while calling sxml-match within let* or car
Date: Mon, 14 Mar 2011 18:40:30 +0100
User-agent: Gnus/5.110013 (No Gnus v0.13) Emacs/23.3 (gnu/linux)

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

[Prev in Thread] Current Thread [Next in Thread]