samth/test-bugs — Issue #56: Command line arguments => segfault
Author: racket-bug-submit
Created: 2012-03-06 18:58:53+00:00
State: open
Labels: C:racket

Originally submitted on: Fri Jun 24 13:04:01 -0400 2011

Run the following code:

(with-output-to-file "X" #:exists 'truncate
(lambda () (for ([i 2044]) (display " x")) (newline)))

Now, in a shell that supports enough command-line arguments, run

racket `cat X`

and this results in a segfault.

GDB shows this stacktrace:

#0 0x0000003d132330c5 in raise () from /lib64/libc.so.6
#1 0x0000003d13234a76 in abort () from /lib64/libc.so.6
#2 0x00000000006419d9 in fault_handler ()
#3
#4 0x000000000064a8eb in allocate_big ()
#5 0x0000000000425b89 in scheme_malloc_fail_ok ()
#6 0x00000000006293cf in scheme_make_vector ()
#7 0x0000000000423f54 in run_from_cmd_line.clone.1 ()
#8 0x0000000000425059 in main_after_stack ()
#9 0x00000000004256d1 in scheme_main_stack_setup ()
#10 0x000000000042509e in main ()

This bug was converted from Gnats bug [12000](http://bugs.racket-lang.org/query/?cmd=view&pr=12000).