unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#10914: Segfault when creating vector >= 2^16
@ 2012-02-29 23:57 Tobias Brandt
  2012-03-01 21:25 ` Mark H Weaver
  2012-03-01 21:57 ` Ludovic Courtès
  0 siblings, 2 replies; 8+ messages in thread
From: Tobias Brandt @ 2012-02-29 23:57 UTC (permalink / raw)
  To: 10914

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)))





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

* bug#10914: Segfault when creating vector >= 2^16
  2012-02-29 23:57 bug#10914: Segfault when creating vector >= 2^16 Tobias Brandt
@ 2012-03-01 21:25 ` Mark H Weaver
  2012-03-01 21:36   ` Tobias Brandt
  2012-03-01 21:57 ` Ludovic Courtès
  1 sibling, 1 reply; 8+ messages in thread
From: Mark H Weaver @ 2012-03-01 21:25 UTC (permalink / raw)
  To: Tobias Brandt; +Cc: 10914

Tobias Brandt <tob.brandt@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





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

* bug#10914: Segfault when creating vector >= 2^16
  2012-03-01 21:25 ` Mark H Weaver
@ 2012-03-01 21:36   ` Tobias Brandt
  0 siblings, 0 replies; 8+ messages in thread
From: Tobias Brandt @ 2012-03-01 21:36 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: 10914

On 1 March 2012 22:25, Mark H Weaver <mhw@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.





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

* bug#10914: Segfault when creating vector >= 2^16
  2012-02-29 23:57 bug#10914: Segfault when creating vector >= 2^16 Tobias Brandt
  2012-03-01 21:25 ` Mark H Weaver
@ 2012-03-01 21:57 ` Ludovic Courtès
  2012-03-01 23:45   ` Tobias Brandt
  1 sibling, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2012-03-01 21:57 UTC (permalink / raw)
  To: Tobias Brandt; +Cc: 10914

Tobias Brandt <tob.brandt@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’.





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

* bug#10914: Segfault when creating vector >= 2^16
  2012-03-01 21:57 ` Ludovic Courtès
@ 2012-03-01 23:45   ` Tobias Brandt
  2012-03-02 20:15     ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Tobias Brandt @ 2012-03-01 23:45 UTC (permalink / raw)
  To: 10914

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 ?? ()





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

* bug#10914: Segfault when creating vector >= 2^16
  2012-03-01 23:45   ` Tobias Brandt
@ 2012-03-02 20:15     ` Ludovic Courtès
  2012-03-03  3:00       ` Tobias Brandt
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2012-03-02 20:15 UTC (permalink / raw)
  To: Tobias Brandt; +Cc: 10914

Hi Tobias,

Tobias Brandt <tob.brandt@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’.





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

* bug#10914: Segfault when creating vector >= 2^16
  2012-03-02 20:15     ` Ludovic Courtès
@ 2012-03-03  3:00       ` Tobias Brandt
  2012-03-07 21:52         ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Tobias Brandt @ 2012-03-03  3:00 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 10914

> 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.





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

* bug#10914: Segfault when creating vector >= 2^16
  2012-03-03  3:00       ` Tobias Brandt
@ 2012-03-07 21:52         ` Ludovic Courtès
  0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2012-03-07 21:52 UTC (permalink / raw)
  To: Tobias Brandt; +Cc: 10914-done

Hi Tobias,

Tobias Brandt <tob.brandt@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’.





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

end of thread, other threads:[~2012-03-07 21:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-29 23:57 bug#10914: Segfault when creating vector >= 2^16 Tobias Brandt
2012-03-01 21:25 ` Mark H Weaver
2012-03-01 21:36   ` Tobias Brandt
2012-03-01 21:57 ` Ludovic Courtès
2012-03-01 23:45   ` Tobias Brandt
2012-03-02 20:15     ` Ludovic Courtès
2012-03-03  3:00       ` Tobias Brandt
2012-03-07 21:52         ` Ludovic Courtès

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).