[Top][All Lists]

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

Re: display-error segmentation fault

From: Dirk Herrmann
Subject: Re: display-error segmentation fault
Date: Tue, 16 Jan 2001 12:47:24 +0100 (MET)

On 13 Jan 2001, Marius Vollmer wrote:

> Neil Jerram <address@hidden> writes:
> > This is with a current CVS Guile (on a GNU/Linux system).
> > 
> > address@hidden neil]$ guile
> > guile> (display-error #f #f #f #f #f #f)
> > Segmentation fault (core dumped)
> > address@hidden neil]$ 
> > 
> > The problem arises because scm_display_error does not check that its
> > port argument actually is a port.
> I think there is little reason why display-error should not check its
> arguments like every other function.  We have to be careful to not
> generate an infinite loop when trying to signal an error from within
> the error reporting machinery.  Aborting is probably OK, but in a more
> controlled way than waiting for the segv.

Maybe the function should be split up into scm_c_display_error, which does
not perform any parameter checking, and scm_display_error, which is just a
wrapper that can be called from the scheme level.  In case of an error
with the arguments that were passed to scm_display_error, the function
scm_c_display_error can still safely be called to report the erroneous
call to scm_display_error.

Best regards,
Dirk Herrmann

reply via email to

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