[racket] Racket 5.2.1 segfault

From: Simon Haines (simon.haines at con-amalgamate.net)
Date: Thu Mar 1 00:29:34 EST 2012

I'm coming across a segfault when using racket 5.2.1 in some particular

Here is a sample to reproduce the problem:
#lang racket/base
(display "This is a test, designed to provoke an emotional response")

When I chmod +x and run it, it runs just fine:
$ /home/simon/racket/bin/racket -v
Welcome to Racket v5.2.1.
$ ./test.rkt
This is a test, designed to provoke an emotional response

Running under valgrind segfaults the process:
$ valgrind ./test.rkt
==19366== Memcheck, a memory error detector
==19366== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==19366== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==19366== Command: ./test.rkt
==19366== Invalid read of size 8
==19366==    at 0x5DD34D: scheme_longjmpup (in
==19366==    by 0x4402CD: scheme_handle_stack_overflow (in
==19366==    by 0x478DD0: overflow_equal_hash_key (in
==19366==    by 0x47D63A: equal_hash_key (in /home/simon/racket/bin/racket)
==19366==    by 0x47DB39: scheme_equal_hash_key (in
==19366==    by 0x51147E: make_hash_indices_for_equal (in
==19366==    by 0x479476: get_bucket (in /home/simon/racket/bin/racket)
==19366==    by 0x47AF1E: scheme_lookup_in_table (in
==19366==    by 0x5FB742: scheme_make_prefab_struct_type_raw (in
==19366==    by 0x5FE5F8: scheme_lookup_prefab_type (in
==19366==    by 0x621408: scheme_init_thread_places (in
==19366==    by 0x42DBB4: place_instance_init (in
==19366==  Address 0x8 is not stack'd, malloc'd or (recently) free'd
SIGSEGV MAPERR si_code 1 fault on addr 0x8
==19366== HEAP SUMMARY:
==19366==     in use at exit: 8,554,151 bytes in 1,497 blocks
==19366==   total heap usage: 1,507 allocs, 10 frees, 8,567,479 bytes
==19366== LEAK SUMMARY:
==19366==    definitely lost: 16,680 bytes in 4 blocks
==19366==    indirectly lost: 0 bytes in 0 blocks
==19366==      possibly lost: 576 bytes in 2 blocks
==19366==    still reachable: 8,536,895 bytes in 1,491 blocks
==19366==         suppressed: 0 bytes in 0 blocks
==19366== Rerun with --leak-check=full to see details of leaked memory
==19366== For counts of detected and suppressed errors, rerun with: -v
==19366== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2)
zsh: killed     valgrind ./test.rkt

I first came across this issue trying to run racket under apache, where I
suspect the process was being killed off due to its memory usage. Is that
8mb of heap allocation usual for a racket/base process? Should I file a bug
or is there something wrong with my setup?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120301/c073278c/attachment.html>

Posted on the users mailing list.