[Top][All Lists]

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

[FIXED:] display-error segmentation fault

From: Dirk Herrmann
Subject: [FIXED:] display-error segmentation fault
Date: Wed, 24 Jan 2001 17:06:52 +0100 (MET)

On Tue, 16 Jan 2001, Dirk Herrmann wrote:

> 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.

I have split scm_display_error into two functions:  scm_i_display_error
and scm_display_error.  The function scm_display_error is now just a
wrapper to perform parameter checking.  Further, all calls (actually,
there was just one :-) within libguile to scm_display_error were changed
to call scm_i_display_error directly.

Thanks for providing the bug report.

Best regards,
Dirk Herrmann

reply via email to

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