Opened 8 years ago

Closed 8 years ago

#1221 closed defect (fixed)

Large / many constants cause segfaults

Reported by: sjamaan Owned by:
Priority: critical Milestone: 4.11.0
Component: unknown Version: 4.9.x
Keywords: Cc:
Estimated difficulty:

Description (last modified by sjamaan)

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

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

Change History (3)

comment:1 Changed 8 years ago by sjamaan

OK, looks like this is a size calculation problem in C_rereclaim2 (see chicken-hackers thread).

Last edited 8 years ago by sjamaan (previous) (diff)

comment:2 Changed 8 years ago by sjamaan

Description: modified (diff)

comment:3 Changed 8 years ago by sjamaan

Resolution: fixed
Status: newclosed

Fixed by b7510458def3b95ab4656a03640e39b6247b0672

Note: See TracTickets for help on using tickets.