[CM] C Stack Unwinding

Woody Douglass wdouglass at carnegierobotics.com
Wed Nov 3 08:03:58 PDT 2021


I think i may still be missing something -- shouldn't the stack unwind
past the display call in bad_func, and return the #f from the error
function directly from s7_call_with_catch? alternatively, is there a
general way to determine if a given s7 call returned an object from an
error handler?

I'm trying to treat `s7_call_with_catch` in C the same way i'd treat
`catch` in scheme, but it seems i'll have to make a bunch of
intermediate error checks anyway...is this true?

Thanks again,
Woody

On Wed, 2021-11-03 at 06:47 -0700, bil at ccrma.Stanford.EDU wrote:
> There is a bug in s7 -- it did not protect against a stack underflow
> because it incorrectly assumed the s7_call_with_catch was in a
> context where some scheme code was awaiting a result, not all by
> itself
> (hence the "unknown operator" or "stack underflow"). I need to test
> my
> bugfix -- I will try to make a new version of s7 later today.
> 
> With that fixed, s7_call_with_catch returns #t because the error was
> caught -- "ret" in bad_func is #f, bad_func displays "#f\n", then
> returns #t.  So "result" is #t.
> 
> Thanks very much for the bug report!
> 



More information about the Cmdist mailing list