Hi, it looks like there's a memory leak when functions/methods raise an exception. I'm seeing this with Faiss Ruby with rb_check_frozen (CI logs) as well as the minimal function below:
Rice::define_global_function("hello", []() {
throw std::runtime_error("error");
});