chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-janitors] Re: [Chicken-bugs] #326: Crash in libchicken.so when


From: Chicken Scheme
Subject: [Chicken-janitors] Re: [Chicken-bugs] #326: Crash in libchicken.so when using the tinyclos egg
Date: Wed, 19 Sep 2007 15:45:09 -0000

#326: Crash in libchicken.so when using the tinyclos egg
--------------------------------------------+-------------------------------
Reporter:  asandroq                         |        Owner:                
    Type:  defect                           |       Status:  new           
Priority:  critical                         |    Component:  core libraries
 Version:  2.7                              |   Resolution:                
Keywords:  segfault linux amd64 libchicken  |  
--------------------------------------------+-------------------------------
Comment (by chust):

 Replying to [comment:7 asandroq]:
 > Ok, so I debugged my program more and it, unsurprisingly, has a bug,
 which causes `(void)` to be passed to `sqlite3:map-row`:
 >
 > `(sqlite3:map-row make-cost get-cost-by-month-stmt id (void))`
 >
 > [...]

 Aha, at least I now know where the problem is: sqlite3:map-row internally
 calls sqlite3:bind! which is a TinyCLOS generic dispatching on the type of
 value to bind to a statement parameter. But TinyCLOS apparently has a bug
 handling the method dispatch when (void) is passed as a parameter to a
 generic. Check this example:
 {{{
 % csi -n

 CHICKEN
 Version 2.709 - macosx-unix-gnu-ppc - [ manyargs dload ptables applyhook ]
 (c)2000-2007 Felix L. Winkelmann | compiled 2007-09-18 on imurph.local
 (Darwin)

 #;1> (use tinyclos)
 ; loading /usr/local/lib/chicken/1/tinyclos.scm ...
 ; loading /usr/local/lib/chicken/1/tinyclos-base.so ...
 #;2> (define-generic foo)
 #;3> (define-method (foo (x <integer>)) (* x 42))
 #;4> (foo 23) ; this works fine
 966
 #;5> (foo "foo") ; this throws an error like it should
 Error: call-next-method: no methods left: #<procedure (f_1907 . args209)>

         Call history:

         <syntax>                (foo "foo")
         <eval>          (foo "foo")     <--
 #;5> (foo (void)) ; this crashes the program
 }}}

-- 
Ticket URL: <http://trac.callcc.org/ticket/326#comment:8>
Chicken Scheme <http://www.call-with-current-continuation.org/>
The CHICKEN Scheme-to-C compiler

reply via email to

[Prev in Thread] Current Thread [Next in Thread]