GNU bug report logs - #10914
Segfault when creating vector >= 2^16

Previous Next

Package: guile;

Reported by: Tobias Brandt <tob.brandt <at> googlemail.com>

Date: Wed, 29 Feb 2012 23:59:01 UTC

Severity: normal

Done: ludo <at> gnu.org (Ludovic Courtès)

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 10914 in the body.
You can then email your comments to 10914 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#10914; Package guile. (Wed, 29 Feb 2012 23:59:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tobias Brandt <tob.brandt <at> googlemail.com>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Wed, 29 Feb 2012 23:59:01 GMT) Full text and rfc822 format available.

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

From: Tobias Brandt <tob.brandt <at> googlemail.com>
To: bug-guile <at> gnu.org
Subject: Segfault when creating vector >= 2^16
Date: Thu, 1 Mar 2012 00:57:41 +0100
Guile segfaults when a vector is created with size >= 2^16 = 65535.
Observe:

scheme@(guile-user)> (define v1 (make-vector 65534))
scheme@(guile-user)> (define v2 (make-vector 65535))
Segmentation fault

It also fails for greater sizes.

Curiously enough, this works:
scheme@(guile-user)> (define v2 (list->vector (iota 65535)))




Information forwarded to bug-guile <at> gnu.org:
bug#10914; Package guile. (Thu, 01 Mar 2012 21:29:02 GMT) Full text and rfc822 format available.

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

From: Mark H Weaver <mhw <at> netris.org>
To: Tobias Brandt <tob.brandt <at> googlemail.com>
Cc: 10914 <at> debbugs.gnu.org
Subject: Re: bug#10914: Segfault when creating vector >= 2^16
Date: Thu, 01 Mar 2012 16:25:12 -0500
Tobias Brandt <tob.brandt <at> googlemail.com> writes:
> Guile segfaults when a vector is created with size >= 2^16 = 65535.
> Observe:
>
> scheme@(guile-user)> (define v1 (make-vector 65534))
> scheme@(guile-user)> (define v2 (make-vector 65535))
> Segmentation fault

I cannot reproduce this.  Please give us more details.  What version of
Guile are you using, and on what platform (operating system, processor
type, 64/32-bit)?  What compiler did you use to compile Guile, or are
you using a pre-built binary from somewhere?

    Thanks,
      Mark




Information forwarded to bug-guile <at> gnu.org:
bug#10914; Package guile. (Thu, 01 Mar 2012 21:38:01 GMT) Full text and rfc822 format available.

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

From: Tobias Brandt <tob.brandt <at> googlemail.com>
To: Mark H Weaver <mhw <at> netris.org>
Cc: 10914 <at> debbugs.gnu.org
Subject: Re: bug#10914: Segfault when creating vector >= 2^16
Date: Thu, 1 Mar 2012 22:36:38 +0100
On 1 March 2012 22:25, Mark H Weaver <mhw <at> netris.org> wrote:
> I cannot reproduce this.  Please give us more details.  What version of
> Guile are you using, and on what platform (operating system, processor
> type, 64/32-bit)?  What compiler did you use to compile Guile, or are
> you using a pre-built binary from somewhere?

I'm using the guile version from git commit
79eb47ea47650ef42c545931726277a7118a0210.
I compiled it myself with gcc 4.6.1 on Ubuntu 11.10 (64bit).
I also used a self compiled version of libgc (7.2alpha6).

I traced the execution with gdb, the segementation fault happens
in GC_is_marked() from /usr/lib/libgc.so.1. So it seems to be an error
in my libgc not in guile.




Information forwarded to bug-guile <at> gnu.org:
bug#10914; Package guile. (Thu, 01 Mar 2012 21:59:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Tobias Brandt <tob.brandt <at> googlemail.com>
Cc: 10914 <at> debbugs.gnu.org
Subject: Re: bug#10914: Segfault when creating vector >= 2^16
Date: Thu, 01 Mar 2012 22:57:48 +0100
Tobias Brandt <tob.brandt <at> googlemail.com> skribis:

> scheme@(guile-user)> (define v2 (make-vector 65535))
> Segmentation fault

For the record, I can’t reproduce this either on x86_64-linux-gnu and
armv5tel-linux-gnueabi.

Ludo’.




Information forwarded to bug-guile <at> gnu.org:
bug#10914; Package guile. (Thu, 01 Mar 2012 23:46:02 GMT) Full text and rfc822 format available.

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

From: Tobias Brandt <tob.brandt <at> googlemail.com>
To: 10914 <at> debbugs.gnu.org
Subject: Re: bug#10914: Segfault when creating vector >= 2^16
Date: Fri, 2 Mar 2012 00:45:02 +0100
My libgc was indeed faulty. It failed one test related to threads.
I recompiled guile against a working libgc, but the error still
happens. Here is a backtrace from gdb:


#0  0x00007ffff7b383d7 in scm_c_make_vector () from /usr/lib/libguile-2.2.so.22
#1  0x00007ffff7b412a4 in ?? () from /usr/lib/libguile-2.2.so.22
#2  0x00007ffff7ac4953 in scm_primitive_eval () from /usr/lib/libguile-2.2.so.22
#3  0x00007ffff7ac49b3 in scm_eval () from /usr/lib/libguile-2.2.so.22
#4  0x00007ffff7b11d3f in scm_shell () from /usr/lib/libguile-2.2.so.22
#5  0x00007ffff7ae112d in ?? () from /usr/lib/libguile-2.2.so.22
#6  0x00007ffff7abf20a in ?? () from /usr/lib/libguile-2.2.so.22
#7  0x00007ffff7b4af7f in ?? () from /usr/lib/libguile-2.2.so.22
#8  0x00007ffff7ac43b3 in scm_call_4 () from /usr/lib/libguile-2.2.so.22
#9  0x00007ffff7abf9c3 in ?? () from /usr/lib/libguile-2.2.so.22
#10 0x00007ffff7abfa75 in scm_c_with_continuation_barrier ()
   from /usr/lib/libguile-2.2.so.22
#11 0x00007ffff7b33b5a in ?? () from /usr/lib/libguile-2.2.so.22
#12 0x00007ffff7258aa5 in GC_call_with_stack_base () from /usr/lib/libgc.so.1
#13 0x00007ffff7b33d08 in scm_with_guile () from /usr/lib/libguile-2.2.so.22
#14 0x00007ffff7ae1235 in scm_boot_guile () from /usr/lib/libguile-2.2.so.22
#15 0x0000000000400a3a in ?? ()
#16 0x00007ffff74cc30d in __libc_start_main () from
/lib/x86_64-linux-gnu/libc.so.6
#17 0x0000000000400a89 in ?? ()
#18 0x00007fffffffe098 in ?? ()
#19 0x000000000000001c in ?? ()
#20 0x0000000000000001 in ?? ()
#21 0x00007fffffffe3a1 in ?? ()
#22 0x0000000000000000 in ?? ()




Information forwarded to bug-guile <at> gnu.org:
bug#10914; Package guile. (Fri, 02 Mar 2012 20:17:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Tobias Brandt <tob.brandt <at> googlemail.com>
Cc: 10914 <at> debbugs.gnu.org
Subject: Re: bug#10914: Segfault when creating vector >= 2^16
Date: Fri, 02 Mar 2012 21:15:34 +0100
Hi Tobias,

Tobias Brandt <tob.brandt <at> googlemail.com> skribis:

> My libgc was indeed faulty. It failed one test related to threads.
> I recompiled guile against a working libgc, but the error still
> happens. Here is a backtrace from gdb:
>
>
> #0  0x00007ffff7b383d7 in scm_c_make_vector () from /usr/lib/libguile-2.2.so.22

That’s Guile ‘master’.  Which Git commit exactly?

Can you reproduce it with Guile 2.0?

Thanks,
Ludo’.




Information forwarded to bug-guile <at> gnu.org:
bug#10914; Package guile. (Sat, 03 Mar 2012 03:02:01 GMT) Full text and rfc822 format available.

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

From: Tobias Brandt <tob.brandt <at> googlemail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 10914 <at> debbugs.gnu.org
Subject: Re: bug#10914: Segfault when creating vector >= 2^16
Date: Sat, 3 Mar 2012 04:00:07 +0100
> That’s Guile ‘master’.  Which Git commit exactly?
>
> Can you reproduce it with Guile 2.0?
>
> Thanks,
> Ludo’.


It's commit dee4e3ee3cbd4badeaf9beedfaf4cd8800f56a0b.
It also happened with commit 79eb47ea47650ef42c545931726277a7118a0210.

I upgraded to Ubuntu 12.04 which contains guile-2.0.
make-vector works fine with that package. It also works
in the Ubuntu provided guile-1.8.

If nobody can reproduce this error in HEAD, I suggest closing
the bug. There is probably something wrong with my setup.




Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Wed, 07 Mar 2012 21:54:02 GMT) Full text and rfc822 format available.

Notification sent to Tobias Brandt <tob.brandt <at> googlemail.com>:
bug acknowledged by developer. (Wed, 07 Mar 2012 21:54:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Tobias Brandt <tob.brandt <at> googlemail.com>
Cc: 10914-done <at> debbugs.gnu.org
Subject: Re: bug#10914: Segfault when creating vector >= 2^16
Date: Wed, 07 Mar 2012 22:52:35 +0100
Hi Tobias,

Tobias Brandt <tob.brandt <at> googlemail.com> skribis:

> If nobody can reproduce this error in HEAD, I suggest closing
> the bug. There is probably something wrong with my setup.

To my surprise, the bug did exist in HEAD (I had tested only 2.0.)
It is fixed in c336514976ed3f2b2b20c56149ede7f5ec549c52.

But really, HEAD is for the brave.  It currently aborts in the middle of
./check-guile for me.  ;-)

Thanks,
Ludo’.




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

This bug report was last modified 12 years and 24 days ago.

Previous Next


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