unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* Segment fault when Guile displays a backtrace
@ 2007-07-02  2:13 xeos
  2007-07-10 21:31 ` Ludovic Courtès
  2007-07-24 23:25 ` Ludovic Courtès
  0 siblings, 2 replies; 4+ messages in thread
From: xeos @ 2007-07-02  2:13 UTC (permalink / raw)
  To: bug-guile


[-- Attachment #1.1: Type: text/plain, Size: 1745 bytes --]

Hi everyone,

I have found a bug on cvs guile. It has been reproduced by two users
more too. When Guile crashed when it evaluates a wrong expression of
the form:

  (set! 'symbol value)

Guile should throw (and it do throw) a exeption, Nevertheless it
crashed in the middle of backtrace log. Excuse me. I would have like
send a patch in order to fix it but but I am not familiarized with
guile project. Anyway, I put output of gdb below.

It is the output log:

    $ guile
    guile> (set! 'symbol value)

    Backtrace:
    In standard input:
       1: 0* Violación de segmento


and it is the gdb output log:

    [Thread debugging using libthread_db enabled]
    [New Thread -1211996480 (LWP 12319)]
    [New Thread -1214342256 (LWP 12322)]

    guile> (set! 'd 5)

    Backtrace:
    In standard input:
       1: 0*
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread -1211996480 (LWP 12319)]
    unmemoize_exprs (exprs=0xb7b7ab30, env=0xb7b7aba0) at eval.c:588
    588     {
    (gdb) backtrace
    #0  unmemoize_exprs (exprs=0xb7b7ab30, env=0xb7b7aba0) at eval.c:588
    #1  0xb7e730b8 in unmemoize_expression (expr=0xb7b7ab80, env=0xb7b7aba0)
        at eval.c:955
    #2  0xb7e73245 in unmemoize_exprs (exprs=<value optimized out>,
env=0xb7b7aba0)
        at eval.c:613
    #3  0xb7e730b8 in unmemoize_expression (expr=0xb7b7ab80, env=0xb7b7aba0)
        at eval.c:955
    #4  0xb7e73245 in unmemoize_exprs (exprs=<value optimized out>,
env=0xb7b7aba0)
        at eval.c:613
    #5  0xb7e730b8 in unmemoize_expression (expr=0xb7b7ab80, env=0xb7b7aba0)


Good luck and excuse me again. :-)

-- 
Is all that we see or seem but a dream within a dream?

[-- Attachment #1.2: Type: text/html, Size: 2479 bytes --]

[-- Attachment #2: Type: text/plain, Size: 137 bytes --]

_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Segment fault when Guile displays a backtrace
@ 2007-07-02 13:15 Marco Maggi
  0 siblings, 0 replies; 4+ messages in thread
From: Marco Maggi @ 2007-07-02 13:15 UTC (permalink / raw)
  To: bug-guile

"xeos" wrote:
>I have found a bug on cvs guile. It has been
>reproduced by two users more too. When Guile
>crashed when it evaluates a wrong expression
>of the form:
>
>  (set! 'symbol value)

I have stumbled upon backtrace dump a number
of times, but I was never able to reduce it
to such a simple form.

IMHO it cannot be fixed without understanding
what is going on in "eval.c", which, unfortunately
is a royal mess of a module.

I also have a dump involving a "deval" call with
NULL arguments, which belongs to "eval.c", too.

--
Marco Maggi

"They say jump!, you say how high?"
Rage Against the Machine - "Bullet in the Head"



_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Segment fault when Guile displays a backtrace
  2007-07-02  2:13 Segment fault when Guile displays a backtrace xeos
@ 2007-07-10 21:31 ` Ludovic Courtès
  2007-07-24 23:25 ` Ludovic Courtès
  1 sibling, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2007-07-10 21:31 UTC (permalink / raw)
  To: bug-guile

Hi,

xeos <xeos00@gmail.com> writes:

> I have found a bug on cvs guile. It has been reproduced by two users
> more too. When Guile crashed when it evaluates a wrong expression of
> the form:
>
>   (set! 'symbol value)
>
> Guile should throw (and it do throw) a exeption, Nevertheless it
> crashed in the middle of backtrace log.

This won't be fixed in 1.8.2 because it needs some more thought.

Basically, this has to do with memoization of the generalized `set!'.
The `(quote symbol)' is being weirdly memoized:

  $ guile -c "(set! 'x 2)"
  ERROR: In procedure memoization:
  ERROR: Bad variable (#@begin #-1#) in expression (set! (#@begin #-1#) 2).

As you can see, the memoized thing is a recursive list, hence the
endless recursion while unmemoizing the faulty expression to display the
backtrace.

The real fix may be to remove the `macroexp ()' function, as already
suggested by the comment in there.  Thus I'll look at it after 1.8.2 is
out (if no one fixes it in the meantime  ;-)).

Thanks,
Ludovic.



_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Segment fault when Guile displays a backtrace
  2007-07-02  2:13 Segment fault when Guile displays a backtrace xeos
  2007-07-10 21:31 ` Ludovic Courtès
@ 2007-07-24 23:25 ` Ludovic Courtès
  1 sibling, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2007-07-24 23:25 UTC (permalink / raw)
  To: bug-guile

Hi,

xeos <xeos00@gmail.com> writes:

> I have found a bug on cvs guile. It has been reproduced by two users
> more too. When Guile crashed when it evaluates a wrong expression of
> the form:
>
>   (set! 'symbol value)

"Luigi Semenzato" <luigi@semenzato.com> writes:

> $ guile
> guile> (version)
> "1.8.1"
> guile> (set! 'x #t)
>
> Backtrace:
> In standard input:
>   2: 0* Segmentation fault (core dumped)

I fixed it in CVS, so it will be in the next stable release.

Thanks,
Ludovic.




_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-07-24 23:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-02  2:13 Segment fault when Guile displays a backtrace xeos
2007-07-10 21:31 ` Ludovic Courtès
2007-07-24 23:25 ` Ludovic Courtès
  -- strict thread matches above, loose matches on Subject: below --
2007-07-02 13:15 Marco Maggi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).