[CM] C Stack Unwinding

Woody Douglass wdouglass at carnegierobotics.com
Thu Nov 4 05:16:11 PDT 2021


Bill,

I think I found one more issue. It appears that error unwinding behaves
differently depending on if the function was added via
`s7_make_function` or `s7_define_function`. Consider the revised C file
attached.

I expect the format line (line 26) to print the same value for both
calls, but the value is different.

Thanks for taking one more look,
Woody

On Wed, 2021-11-03 at 20:04 +0000, Woody Douglass wrote:
> I see -- thank you very much!
> 
> -Woody
> 
> On Wed, 2021-11-03 at 10:37 -0700, bil at ccrma.Stanford.EDU wrote:
> > If you had called s7_error, rather than s7_eval_c_string,
> > it would have behaved as you expect, but s7_eval interposes
> > its own set_jmp, so s7_eval_c_string jumps to it.
> > It might be possible to make these more consistent.
> > But it's easy to get around this -- just include a
> > catch in the scheme code, return an error indication
> > from scheme, and return from bad_func if one is seen.
> > 
> 
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> https://cm-mail.stanford.edu/mailman/listinfo/cmdist
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testerror.c
Type: text/x-csrc
Size: 1086 bytes
Desc: testerror.c
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20211104/4203d6ba/attachment.bin>


More information about the Cmdist mailing list