[gambit-list] print vs. display segfault

Lang Martin lang-gb at coptix.com
Thu Apr 26 10:10:30 EDT 2007


On Apr 26, 2007, at 8:45 AM, Christian Jaeger wrote:

> Your code is using %string-charset->pred which you don't specify in  
> your mail.

I omitted it because it didn't seem to matter -- the segfault does  
not occur if I simply change print to display in the main loop. Well,  
that once in the main loop, since it's also called from the default  
value of escape.

However, here it is:

(define (%string-charset->pred obj)
    (cond ((procedure? obj) obj)
          ((list? obj) (lambda (c) (memq c obj)))
          ((string? obj) (%string-charset->pred (string->list obj)))
          ((char? obj) (lambda (c) (char=? c obj)))))

It simply creates a predicate from "abc" or '(#\a #\b #\c) in the  
same way.

> BTW are you using (declare (not safe)) ?

I am not, and should have said so. The code that crashes is  
interpreted, not compiled, and gsi was built with just the standard  
options. I didn't even bother with --single-host or anything when I  
installed it.

> I think print
> [...]

Ah. That's surprising. I'll go ahead and try to duplicate the fault  
then, and see if I can get get gdb to help me narrow in on the  
problem. Thanks, and other thoughts are welcome.





More information about the Gambit-list mailing list