• KOBAYASHI Shuji's avatar
    Fix broken NaN with `MRB_NAN_BOXING` · f639da0f
    KOBAYASHI Shuji authored
    Example:
    
      $ bin/mruby -e '(Float::INFINITY - Float::INFINITY).nan?'
      zsh: segmentation fault
    
    Cause:
    
      `SET_FLOAT_VALUE` is not used. It is needed for normalizing NaN.
    
    Treatment:
    
      In my environment, this issue could be reproduced only when
      `infinity - infinity`, however `SET_FLOAT_VALUE` should be used in all
      arithmetic operations (regardless of boxing setting), I think.
    
      So I fixed all similar codes by extracting to macro.
    f639da0f
vm.c 73.7 KB