This is the mail archive of the guile@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug in scm_call_catching_errors


Hello!

In root.c there is a function scm_call_catching_errors, which is not
called from anywhere within guile.  Further, this function misuses the
variable scm_gc_heap_lock to make the function scm_error abort if an error
occurs within an error handler.  This is a bug, since the error handler
might legally request some cells and thus cause a gc, even if everything
is allright.  But, the gc which is called while scm_gc_heap_lock is set,
will abort under the assumption that gc was called recursively.

Thus:

1) Is this function used at all?  If not, we should deprecate it.  It
   seems to me that the functions in throw.[ch] provide an easier to use
   interface anyway.

2) As a fix (either until scm_call_catching_errors is removed or, if it
   shall be kept, forever), I suggest adding a variable
   scm_abort_on_error_p that is used instead of scm_gc_heap_lock.

Best regards
Dirk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]