[Chicken-users] Chicken segfault

2011-06-16 Thread Sven Hartrumpf
Hi all.

When stepping from optimization level 2 to 3, I get a segmentation fault.

level 3:
 chicken r-matcher-ch.scm -output-file r-matcher-ch.c -debug-level 1 
 -optimize-level 2
Warning: redefinition of standard binding: symbol-string
Segmentation fault
[ERROR: 139] 


level 2:
 chicken r-matcher-ch.scm -output-file r-matcher-ch.c -debug-level 1 
 -optimize-level 2
Warning: redefinition of standard binding: symbol-string

The resulting C file and the binary work perfectly.

 csi
CHICKEN
(c)2008-2011 The Chicken Team
(c)2000-2007 Felix L. Winkelmann
Version 4.7.0 
linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ]
compiled 2011-06-16 on dummy (Linux)

How should I investigate this problem?
Or is this a known problem?

Greetings
Sven

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Chicken segfault

2011-06-16 Thread Peter Bex
On Thu, Jun 16, 2011 at 04:36:16PM +0200, Sven Hartrumpf wrote:
 Hi all.
 
 How should I investigate this problem?

Tried gdb?

 Or is this a known problem?

AFAIK no, but just to chime in and let you know, I've also gotten
some random segmentation faults in csi which I haven't been able
to put a finger on yet.  Here's hoping that it's possibly the same
cause...

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music.
-- Donald Knuth

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Chicken segfault

2011-06-16 Thread Sven Hartrumpf
Hi all.

Thu, 16 Jun 2011 19:12:22 +0200, Peter.Bex wrote:

 How should I investigate this problem?
 
 Tried gdb?

Good idea. I rebuilt chicken with DEBUGBUILD=1
and ran gdb on chicken:

(gdb) run r-matcher-ch.scm -output-file r-matcher-ch.c -debug-level 1 
-optimize-level 3
Program received signal SIGSEGV, Segmentation fault.
0x2b1b6ab6 in C_i_list_tail (lst=6, i=5) at runtime.c:4837
4837  if(lst != C_SCHEME_END_OF_LIST  C_block_header(lst) != C_PAIR_TAG)
(gdb) bt
#0  0x2b1b6ab6 in C_i_list_tail (lst=6, i=5) at runtime.c:4837
#1  0x2adf8aa2 in f_6485 (c=4, t0=46912838379416, t1=140737488226416, 
t2=6, t3=5) at library.c:37514
#2  0x2b202c78 in l3 () from free/chicken-4.7.0-64/lib/libchicken.so.6
#3  0x2aaabf1dec68 in ?? ()
#4  0x2b1b9e77 in C_apply (c=4, closure=0, k=140737488226416, 
fn=46912838379416) at runtime.c:5834
#5  0x00580643 in f_12524 (c=2, t0=140737488281200, t1=140737488281008) 
at support.c:5168
#6  0x2b1b9f11 in C_do_apply (n=0, fn=140737488281200, 
k=140737488281008) at runtime.c:5895
#7  0x2b1f866c in C_call_with_values (c=4, closure=0, 
k=140737488335808, thunk=140737488281200, kont=140737488281248) at 
runtime.c:6055
#8  0x0058019c in f_12518 (c=2, t0=140737488336744, t1=140737488335808) 
at support.c:5121
#9  0x2b1b9f11 in C_do_apply (n=0, fn=140737488336744, 
k=140737488335808) at runtime.c:5895
#10 0x2b1f866c in C_call_with_values (c=4, closure=0, 
k=140737488337368, thunk=140737488336744, kont=140737488336048) at 
runtime.c:6055
#11 0x2adda05e in f_10297 (c=2, t0=140737488336320, t1=140737488336704) 
at library.c:31136
#12 0x2ad8e82d in f_18581 (c=2, t0=140737488336512, t1=140737488336320) 
at library.c:17005
#13 0x2add9e54 in f_10293 (c=5, t0=46912838386128, t1=140737488337368, 
t2=140737488336512, t3=140737488336744, t4=140737488336544) at library.c:31118
#14 0x2ad8e6af in f_18575 (c=4, t0=46912838405744, t1=140737488337368, 
t2=140737488336704, t3=140737488336744) at library.c:16979
#15 0x0058000e in f_12497 (c=3, t0=140737488337392, t1=140737488337368, 
t2=140737488336912) at support.c:5107
#16 0x2add98e1 in f_10330 (c=3, t0=140737488337200, t1=140737488337368, 
t2=140737488337008) at library.c:31063
#17 0x2b1f7ef1 in C_call_cc (c=3, closure=0, k=140737488337368, 
cont=140737488337200) at runtime.c:5935
#18 0x2add97b1 in f_10324 (c=3, t0=46912838365584, t1=140737488337368, 
t2=140737488337392) at library.c:31049
#19 0x0057fdd4 in f_12570 (c=2, t0=140737488338064, t1=140737488337760) 
at support.c:5092
#20 0x0057fba7 in f_12572 (t0=140737488338128, t1=140737488338064, 
t2=14) at support.c:5075
#21 0x0057f911 in f_12486 (c=2, t0=140737488338720, t1=140737488338368) 
at support.c:5027
#22 0x0057f628 in f_12607 (t0=140737488338776, t1=140737488338720, 
t2=14) at support.c:4999
#23 0x0057f389 in f_12465 (c=5, t0=46912838392984, t1=140737488341872, 
t2=46912838205344, t3=46912903161632, t4=140737488338992) at support.c:4949
#24 0x0050fae2 in f_3096 (c=2, t0=140737488341904, t1=22) at 
optimizer.c:11796
#25 0x005113a9 in f_2834 (c=3, t0=46912839464584, t1=140737488341904, 
t2=46912879352136) at optimizer.c:12123
#26 0x2af0e715 in f_5409 (t0=140737488339760, t1=140737488341904, 
t2=46912879352136, t3=14) at srfi-1.c:4027
#27 0x2af0e843 in f_5425 (c=2, t0=140737488339648, t1=22) at 
srfi-1.c:4046
#28 0x005113a9 in f_2834 (c=3, t0=46912839464584, t1=140737488339648, 
t2=46912903161904) at optimizer.c:12123
#29 0x2af0e7c1 in f_5409 (t0=140737488339760, t1=140737488341904, 
t2=46912903161904, t3=46912903163824) at srfi-1.c:4032
#30 0x2af0e65b in f_5321r (t0=46912838355152, t1=140737488341904, 
t2=46912839464584, t3=46912903161632, t4=14) at srfi-1.c:4014
#31 0x2af0e3cf in f_5321 (c=4, t0=46912838355152, t1=140737488341904, 
t2=46912839464584, t3=46912903161632) at srfi-1.c:3983
#32 0x0050f90f in f_3156 (c=2, t0=140737488341168, t1=22) at 
optimizer.c:11776
#33 0x2ad7515e in f_21565r (t0=46912838365448, t1=140737488341168, 
t2=46912838205344, t3=46912838231728, t4=14) at library.c:12207
#34 0x2ad75060 in f_21565 (c=4, t0=46912838365448, t1=140737488341168, 
t2=46912838205344, t3=46912838231728) at library.c:12192
#35 0x0057af79 in f_13091 (c=3, t0=46912838393000, t1=140737488341168, 
t2=46912838205344) at support.c:4129
#36 0x0050f860 in f_3150 (c=2, t0=140737488341992, t1=46912838207552) 
at optimizer.c:11761
#37 0x2ad7515e in f_21565r (t0=46912838365448, t1=140737488341992, 
t2=46912838205344, t3=46912838194368, t4=14) at library.c:12207
#38 0x2ad75060 in f_21565 (c=4, t0=46912838365448, t1=140737488341992, 
t2=46912838205344, t3=46912838194368) at library.c:12192
#39 0x0050f695 in f_3016 (c=2, t0=46912903162664, t1=140737488342368) 
at optimizer.c:11737
#40 

Re: [Chicken-users] Chicken segfault

2011-06-16 Thread Felix
From: Sven Hartrumpf hartru...@gmx.net
Subject: Re: [Chicken-users] Chicken segfault
Date: Thu, 16 Jun 2011 21:04:11 +0200 (CEST)

 Hi all.
 
 Thu, 16 Jun 2011 19:12:22 +0200, Peter.Bex wrote:
 
 How should I investigate this problem?
 
 Tried gdb?
 
 Good idea. I rebuilt chicken with DEBUGBUILD=1
 and ran gdb on chicken:
 
 (gdb) run r-matcher-ch.scm -output-file r-matcher-ch.c -debug-level 1 
 -optimize-level 3
 Program received signal SIGSEGV, Segmentation fault.
 0x2b1b6ab6 in C_i_list_tail (lst=6, i=5) at runtime.c:4837
 4837  if(lst != C_SCHEME_END_OF_LIST  C_block_header(lst) != C_PAIR_TAG)
 (gdb) bt
 #0  0x2b1b6ab6 in C_i_list_tail (lst=6, i=5) at runtime.c:4837
 #1  0x2adf8aa2 in f_6485 (c=4, t0=46912838379416, t1=140737488226416, 
 t2=6, t3=5) at library.c:37514
 #2  0x2b202c78 in l3 () from free/chicken-4.7.0-64/lib/libchicken.so.6
 #3  0x2aaabf1dec68 in ?? ()
 #4  0x2b1b9e77 in C_apply (c=4, closure=0, k=140737488226416, 
 fn=46912838379416) at runtime.c:5834
 #5  0x00580643 in f_12524 (c=2, t0=140737488281200, 
 t1=140737488281008) at support.c:5168

Hey, that's good. list-tail is called with a #f argument. If you send me the
source file, I should be able to find the cause quickly. Otherwise I can check
the 4.7.0 tarball and find out what f_12524 is. The former would be better, 
though.


cheers,
felix

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users