rutie icon indicating copy to clipboard operation
rutie copied to clipboard

Prevent Segmentation Fault on ruby 3.2 when nil is passed

Open EmmN opened this issue 2 years ago • 7 comments

EmmN avatar Apr 27 '23 23:04 EmmN

Can this get merged in?

bendangelo avatar Dec 27 '23 19:12 bendangelo

I still get a segfault when returning NilClass::new().to_any_object() to Ruby.

Zapotek avatar Jan 03 '24 09:01 Zapotek

Ok I'm not totally sure who's working on this but I don't know rust so I can't help resolve. This fixes my use case.

bendangelo avatar Jan 03 '24 19:01 bendangelo

@bendangelo you can just install rutie from the fork

[dependencies]
rutie = { git = "https://github.com/MelianLabs/rutie-rb-sys.git", rev = "315ac571f8c8ec4c842df9bbfc85c07cbaccba0e" }

EmmN avatar Jan 04 '24 06:01 EmmN

@EmmN Now I get:

error[E0425]: cannot find value `reserved_bytes` in this scope
   --> /home/zapotek/.cargo/git/checkouts/rutie-rb-sys-501648e53ffbabf9/315ac57/src/dsl.rs:700:35
    |
649 | macro_rules! wrappable_struct {
    | ----------------------------- in this expansion of `wrappable_struct!`
...
700 |                         reserved: reserved_bytes,
    |                                   ^^^^^^^^^^^^^^ not found in this scope
    |
   ::: src/uri.rs:733:1
    |
733 | wrappable_struct!( URI, URIWrapper, URI_WRAPPER );
    | ------------------------------------------------- in this macro invocation



Zapotek avatar Jan 04 '24 07:01 Zapotek

When I don't specify a revision it compiles but I still get a segfault.

Zapotek avatar Jan 04 '24 07:01 Zapotek

@bendangelo you can just install rutie from the fork

[dependencies]
rutie = { git = "https://github.com/MelianLabs/rutie-rb-sys.git", rev = "315ac571f8c8ec4c842df9bbfc85c07cbaccba0e" }

Thanks I've already done this.

bendangelo avatar Jan 04 '24 16:01 bendangelo