chicken-janitors
[Top][All Lists]
Advanced

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

Re: [Chicken-janitors] #1221: Large / many constants cause segfaults


From: Chicken Trac
Subject: Re: [Chicken-janitors] #1221: Large / many constants cause segfaults
Date: Tue, 13 Oct 2015 19:00:04 -0000

#1221: Large / many constants cause segfaults
-----------------------+--------------------
  Reporter:  sjamaan   |      Owner:
      Type:  defect    |     Status:  new
  Priority:  critical  |  Milestone:  4.11.0
 Component:  unknown   |    Version:  4.9.x
Resolution:            |   Keywords:
-----------------------+--------------------
Description changed by sjamaan:

Old description:

> When compiling a Scheme program containing "many" constants that are
> reasonably large, the resulting binary will segfault.
>
> {{{
> #!scm
> (use-for-syntax srfi-1)
>
> (define-syntax generate-literals
>   (ir-macro-transformer
>     (lambda (i r c)
>      `(begin ,@(list-tabulate 1000 (lambda (x) `(define ,(gensym) (quote
> ,(make-vector 1000)))))))))
>
> (generate-literals)
> }}}

New description:

 When compiling a Scheme program containing "many" constants that are
 reasonably large, the resulting binary will segfault.

 {{{
 #!scm
 (use-for-syntax srfi-1)

 (define-syntax generate-literals
   (ir-macro-transformer
     (lambda (i r c)
      `(begin
         ,@(list-tabulate
             1000
             (lambda (x)
               `(define ,(gensym) (quote ,(make-vector 1000)))))))))

 (generate-literals)
 }}}

 This happens with vectors as well as lists (but not strings, because those
 are allocated statically with {{{malloc()}}})

--

--
Ticket URL: <http://bugs.call-cc.org/ticket/1221#comment:2>
CHICKEN Scheme <http://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

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