Closed Zapotek closed 7 years ago
Does anything change if you make comp
a move
closure? Since it's a double free error, I get the impression that String
is being freed twice. This could happen with unsafe and inappropriate bounds on call_without_gvl
(maybe missing 'static
).
That did the trick, thanks a lot @jwilm . :)
@Zapotek You might want to reopen the issue. The compiler can protect you against this error pretty easily. Ruru needs to add a 'static
bound to that closure argument.
Hello,
I'm getting a segfault when trying to run some code without the GVL.
This is the
unsafe_method!
:I've tried cloning the data prior to passing it to
comp
and using slices but I can't seem to get around the issue.The
process
method is simply:The Ruby code is:
Segfault: