bryanp/llhttp

FFI free call fails inside finalizer

matthewd opened this issue · 2 comments

Hi!

While using ruby -d, I noticed the following:

Exception `NoMethodError' at [..]/gems/llhttp-ffi-0.0.1/lib/llhttp/parser.rb:155 - undefined method `llhttp_free' for LLHttp:Module
Did you mean?  rb_llhttp_free

I'm using an old version because of http's dependency pin, but at a glance main doesn't seem relevantly changed, and I think DYM might be right?
https://github.com/metabahn/llhttp/blob/d2899044282fafc513b448c67cba692452683145/ffi/lib/llhttp/parser.rb#L155
https://github.com/metabahn/llhttp/blob/d2899044282fafc513b448c67cba692452683145/ffi/lib/llhttp.rb#L41

Thanks for the detailed report! Will get this fixed and open a corresponding PR in the http repo to bump llhttp-ffi.

@matthewd FYI this is now available in http v5.0.1 (httprb/http#675).