topazproject / topaz

A high performance ruby, written in RPython
topazruby.com
BSD 3-Clause "New" or "Revised" License
1k stars 84 forks source link

Guard Kernel#sleep with nil or String arguments from segfault #849

Closed kachick closed 8 years ago

kachick commented 9 years ago

Guard from below.

$ bin/topaz -e 'sleep(nil)'
[1]    45984 segmentation fault  bin/topaz -e 'sleep(nil)'

$ bin/topaz -e 'sleep(" ")'
[1]    46750 segmentation fault  bin/topaz -e 'sleep(" ")'
alex commented 9 years ago

I feel like float_w should be safe to call with non-float objects?

kachick commented 9 years ago

@alex Yeah, My patches covered only nil or string objects. How about https://github.com/kachick/topaz/commit/f3b68c5b942a41add9df6ebeb04ad8550e08a2f4 ?