unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Goops & Valgrind
@ 2008-08-16  5:15 Han-Wen Nienhuys
  2008-08-18 15:50 ` Ludovic Courtès
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Han-Wen Nienhuys @ 2008-08-16  5:15 UTC (permalink / raw)
  To: guile-devel

Running the test suite through valgrind, I get some fishy errors.

Can someone shed a light on this?  The culprit seems to be 

#define SCM_NUMBER_OF_SLOTS(x) \
 ((SCM_STRUCT_DATA (x)[scm_struct_i_n_words]) - scm_struct_n_extra_words)

where scm_struct_i_n_words is -2


==18569== Invalid read of size 4
==18569==    at 0x4055F93: scm_sys_fast_slot_ref (goops.c:1217)
==18569==    by 0x404073C: ceval (eval.i.c:1337)
==18569==    by 0x40404A6: ceval (eval.i.c:609)
==18569==    by 0x4054EA5: get_slot_value (goops.c:1291)
==18569==    by 0x405684E: scm_sys_initialize_object (goops.c:580)
==18569==    by 0x404073C: ceval (eval.i.c:1337)
==18569==    by 0x40407D5: ceval (eval.i.c:358)
==18569==    by 0x4048C31: scm_m_define (eval.c:1215)
==18569==    by 0x40464CC: scm_apply (eval.i.c:1728)
==18569==    by 0x403F026: ceval (eval.i.c:1037)
==18569==    by 0x404010A: ceval (eval.i.c:329)
==18569==    by 0x40479CA: scm_primitive_eval (eval.c:3992)
==18569==  Address 0x42fda98 is 8 bytes before a block of size 4 alloc'd
==18569==    at 0x4006AEE: malloc (vg_replace_malloc.c:207)
==18569==    by 0x4006C6F: realloc (vg_replace_malloc.c:429)
==18569==    by 0x404F3C7: scm_realloc (gc-malloc.c:109)
==18569==    by 0x404F634: scm_malloc (gc-malloc.c:144)
==18569==    by 0x404F66A: scm_gc_malloc (gc-malloc.c:326)
==18569==    by 0x4054D8E: scm_sys_allocate_instance (goops.c:1541)
==18569==    by 0x404073C: ceval (eval.i.c:1337)
==18569==    by 0x40404A6: ceval (eval.i.c:609)
==18569==    by 0x4048C31: scm_m_define (eval.c:1215)
==18569==    by 0x40464CC: scm_apply (eval.i.c:1728)
==18569==    by 0x403F026: ceval (eval.i.c:1037)
==18569==    by 0x404010A: ceval (eval.i.c:329)



==18569== Invalid read of size 4
==18569==    at 0x4055EF3: scm_sys_fast_slot_set_x (goops.c:1231)
==18569==    by 0x403F673: ceval (eval.i.c:1548)
==18569==    by 0x40407D5: ceval (eval.i.c:358)
==18569==    by 0x4055C24: set_slot_value (goops.c:1336)
==18569==    by 0x405680D: scm_sys_initialize_object (goops.c:584)
==18569==    by 0x404073C: ceval (eval.i.c:1337)
==18569==    by 0x40407D5: ceval (eval.i.c:358)
==18569==    by 0x4048C31: scm_m_define (eval.c:1215)
==18569==    by 0x40464CC: scm_apply (eval.i.c:1728)
==18569==    by 0x403F026: ceval (eval.i.c:1037)
==18569==    by 0x404010A: ceval (eval.i.c:329)
==18569==    by 0x40479CA: scm_primitive_eval (eval.c:3992)
==18569==  Address 0x42fda98 is 8 bytes before a block of size 4 alloc'd
==18569==    at 0x4006AEE: malloc (vg_replace_malloc.c:207)
==18569==    by 0x4006C6F: realloc (vg_replace_malloc.c:429)
==18569==    by 0x404F3C7: scm_realloc (gc-malloc.c:109)
==18569==    by 0x404F634: scm_malloc (gc-malloc.c:144)
==18569==    by 0x404F66A: scm_gc_malloc (gc-malloc.c:326)
==18569==    by 0x4054D8E: scm_sys_allocate_instance (goops.c:1541)
==18569==    by 0x404073C: ceval (eval.i.c:1337)
==18569==    by 0x40404A6: ceval (eval.i.c:609)
==18569==    by 0x4048C31: scm_m_define (eval.c:1215)
==18569==    by 0x40464CC: scm_apply (eval.i.c:1728)
==18569==    by 0x403F026: ceval (eval.i.c:1037)
==18569==    by 0x404010A: ceval (eval.i.c:329)


-- 
 Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen





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

end of thread, other threads:[~2009-01-04 23:36 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-16  5:15 Goops & Valgrind Han-Wen Nienhuys
2008-08-18 15:50 ` Ludovic Courtès
2008-08-19  8:58   ` Han-Wen Nienhuys
2008-08-18 18:58 ` Andy Wingo
2008-08-22 19:00   ` Ludovic Courtès
2008-09-11 21:06   ` Neil Jerram
2008-09-12 19:22     ` Andy Wingo
2008-09-14 12:06       ` Neil Jerram
2008-09-14 17:03         ` Neil Jerram
2009-01-04 12:29         ` Andy Wingo
2009-01-04 21:01           ` Neil Jerram
2009-01-04 23:36             ` Neil Jerram
2008-09-16  7:25     ` Mikael Djurfeldt
2008-09-16  9:29       ` Neil Jerram
2008-08-19 11:53 ` Mikael Djurfeldt
2008-08-19 15:19   ` Han-Wen Nienhuys

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