take-cheeze / mruby-marshal

mruby implementation of cruby marshaling.
12 stars 9 forks source link

Dumped data still collapsed #30

Open IK-O opened 5 years ago

IK-O commented 5 years ago

I ran new test code on Win7 with newest mruby and CRuby(2.5.3p105 (2018-10-18 revision 65156) [i386-mingw32]), and the bug still occurs.

rake test

the result is

Fail: #29 (mrbgems: mruby-marshal)

  • Assertion[1] Expected: "o:\x10MarshalTest\b:\a@af\b0.1:\a@bf\b0.2:\a@cf\b0.3" Actual: "o:\x10MarshalTest\b:\a@af\b0.1:\a@b@\x06:\a@cf\b0.3"

On the other hand, on Ubuntu18.04, the test code passed with no error.

I don't know why this bug occurs on Windows and how to fix it.

Maybe it is related to this issue mruby#4547

Do someone have any ideas to fix this bug?

take-cheeze commented 5 years ago

Could you give me more information about reproduce environment?

IK-O commented 5 years ago

My Windows environment is

OS: Windows 7 Pro SP1 64bit CRuby: ruby 2.5.3p105 (2018-10-18 revision 65156) [i386-mingw32] Bison: bison (GNU Bison) 2.4.1 Compiler1: gcc (Rev1, Built by MSYS2 project) 7.4.0) Compiler2: Visual Studio 2017 compiler

build_config.rb

MRuby::Build.new do |conf|
  if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
    toolchain :visualcpp
  else
    toolchain :gcc
  end

  conf.gem 'mrbgems/mruby-marshal'
  conf.gembox 'default'
end

MRuby::Build.new('test') do |conf|
  # Gets set by the VS command prompts.
  if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
    toolchain :visualcpp
  else
    toolchain :gcc
  end

  conf.gem 'mrbgems/mruby-marshal'

  enable_debug
  conf.enable_bintest
  conf.enable_test

  conf.gembox 'default'
end