[racket-dev] Problem with GC or with my machine?
On Sep 3, Matthew Flatt wrote:
> At Thu, 2 Sep 2010 23:27:08 -0400 (EDT), Hari Prashanth wrote:
> > I am getting the following error... And this is the only message I get...
> >
> > SIGSEGV MAPERR si_code 1 fault on addr 0xfffffffffffffffc
> > This often means 0xfffffffffffffffc isn't getting marked, and was prematurely
> > freed
> > Aborted
> >
> > What does it mean? Has anyone seen this?
> >
> > If you want to take a look at the code that is causing this, let me know.
>
> Thanks for sending the code. I see that it's using Typed Racket with
> #:optimize. Maybe Vincent and Sam should take a look to make sure
> that the optimizer isn't generating incorrect unsafe code?
Removing the `#:optimize' throws an (expected) error instead of
segfaulting. FWIW, the code in question is something like
(define (force p)
(let ([v (unbox p)])
(if (procedure? p)
...the usual...
(error 'force "not a promise"))))
where the mistake is in throwing an error in the else branch instead
of just returning the value. So the code does typecheck. (And the
optimizer might be doing something bad with that `error'.)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!