GNU bug report logs - #12808
segfault with (weird use of) make-struct and make-vtable

Previous Next

Package: guile;

Reported by: Areth Unknown <unknown.areth <at> gmail.com>

Date: Mon, 5 Nov 2012 21:29:02 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12808 in the body.
You can then email your comments to 12808 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#12808; Package guile. (Mon, 05 Nov 2012 21:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Areth Unknown <unknown.areth <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Mon, 05 Nov 2012 21:29:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Areth Unknown <unknown.areth <at> gmail.com>
To: bug-guile <at> gnu.org
Subject: segfault with (weird use of) make-struct and make-vtable
Date: Mon, 5 Nov 2012 22:24:55 +0100
[Message part 1 (text/plain, inline)]
This code makes guile segfault, tested in the versions 2.0.6.49 and
2.0.6.66 ..

--------
(define v-blocks (make-vtable "pR")) ;; note that this is a protected tail
array read-only

(define block-2 (make-struct v-blocks 1 ;; note that this only has one
element
                             '((0 2 2 0)
                               (0 2 2 0)
                               (0 0 0 0)
                               (0 0 0 0))))

;; (struct-ref block-2 0)
;; => Segmentation fault (core dumped)
------

There isn't really any reason (for me) to use make-struct or make-vtable
(instead of srfi-9) as they are very low level, but it still shouldn't
segfault.
So now it's reported.

--
// add
[Message part 2 (text/html, inline)]

Reply sent to Andy Wingo <wingo <at> pobox.com>:
You have taken responsibility. (Tue, 05 Mar 2013 18:55:09 GMT) Full text and rfc822 format available.

Notification sent to Areth Unknown <unknown.areth <at> gmail.com>:
bug acknowledged by developer. (Tue, 05 Mar 2013 18:55:09 GMT) Full text and rfc822 format available.

Message #10 received at 12808-done <at> debbugs.gnu.org (full text, mbox):

From: Andy Wingo <wingo <at> pobox.com>
To: Areth Unknown <unknown.areth <at> gmail.com>
Cc: 12808-done <at> debbugs.gnu.org
Subject: Re: bug#12808: segfault with (weird use of) make-struct and
	make-vtable
Date: Tue, 05 Mar 2013 18:23:46 +0100
On Mon 05 Nov 2012 22:24, Areth Unknown <unknown.areth <at> gmail.com> writes:

> This code makes guile segfault, tested in the versions 2.0.6.49 and
> 2.0.6.66 ..
>
> --------
> (define v-blocks (make-vtable "pR")) ;; note that this is a protected
> tail array read-only
>
> (define block-2 (make-struct v-blocks 1 ;; note that this only has one
> element
>                              '((0 2 2 0)
>                                (0 2 2 0)
>                                (0 0 0 0)
>                                (0 0 0 0))))
>
> ;; (struct-ref block-2 0)
> ;; => Segmentation fault (core dumped)
> ------

Thanks for the report; will be fixed in 2.0.8.

Andy
-- 
http://wingolog.org/

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 03 Apr 2013 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 17 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.