noreply at rubyforge.org
2007-May-04 19:01 UTC
[Win32utils-devel] [ win32utils-Bugs-10589 ] Bug in win32-mmap
Bugs item #10589, was opened at 2007-05-04 12:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85 Category: win32-mmap Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Daniel Berger (djberg96) Assigned to: Daniel Berger (djberg96) Summary: Bug in win32-mmap Initial Comment: Ruby 1.8.6 win32-mmap 0.2.1 Assigning the value 0 to a dynamic setter causes the corresponding getter to fail. This small script demonstrates the problem: require ''win32/mmap'' include Win32 mm = MMap.new(:size => 1024, :name => ''test'') mm.gvalue = 0 p mm.gvalue mm.close The result is: C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `load'': marshal data too short (ArgumentError) from C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `method_missing'' from mmap_test.rb:6 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85
noreply at rubyforge.org
2007-May-08 03:47 UTC
[Win32utils-devel] [ win32utils-Bugs-10589 ] Bug in win32-mmap
Bugs item #10589, was opened at 2007-05-04 12:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85 Category: win32-mmap Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Daniel Berger (djberg96) Assigned to: Daniel Berger (djberg96) Summary: Bug in win32-mmap Initial Comment: Ruby 1.8.6 win32-mmap 0.2.1 Assigning the value 0 to a dynamic setter causes the corresponding getter to fail. This small script demonstrates the problem: require ''win32/mmap'' include Win32 mm = MMap.new(:size => 1024, :name => ''test'') mm.gvalue = 0 p mm.gvalue mm.close The result is: C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `load'': marshal data too short (ArgumentError) from C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `method_missing'' from mmap_test.rb:6 ---------------------------------------------------------------------->Comment By: Daniel Berger (djberg96)Date: 2007-05-07 20:47 Message: (FYI to myself) This is caused by memcpy() truncating marshalled data that ends with "\000" because it treats it as a null. One solution might be to use wmemcpy() instead, but I''m not sure how to get at that function, since msvcrt doesn''t appear to export it. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85
noreply at rubyforge.org
2007-May-10 15:57 UTC
[Win32utils-devel] [ win32utils-Bugs-10589 ] Bug in win32-mmap
Bugs item #10589, was opened at 2007-05-05 04:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85 Category: win32-mmap Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Daniel Berger (djberg96) Assigned to: Daniel Berger (djberg96) Summary: Bug in win32-mmap Initial Comment: Ruby 1.8.6 win32-mmap 0.2.1 Assigning the value 0 to a dynamic setter causes the corresponding getter to fail. This small script demonstrates the problem: require ''win32/mmap'' include Win32 mm = MMap.new(:size => 1024, :name => ''test'') mm.gvalue = 0 p mm.gvalue mm.close The result is: C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `load'': marshal data too short (ArgumentError) from C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `method_missing'' from mmap_test.rb:6 ---------------------------------------------------------------------->Comment By: Park Heesob (phasis68)Date: 2007-05-11 00:57 Message: It''s because the return type of the MemcpyXXX is ''P''. Quick and dirty solution is like this: marshal = memcpy(buf, @address, @size) + "\0" Regards, Park Heesob ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2007-05-08 12:47 Message: (FYI to myself) This is caused by memcpy() truncating marshalled data that ends with "\000" because it treats it as a null. One solution might be to use wmemcpy() instead, but I''m not sure how to get at that function, since msvcrt doesn''t appear to export it. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85
noreply at rubyforge.org
2007-May-16 07:58 UTC
[Win32utils-devel] [ win32utils-Bugs-10589 ] Bug in win32-mmap
Bugs item #10589, was opened at 2007-05-04 12:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85 Category: win32-mmap Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Daniel Berger (djberg96) Assigned to: Daniel Berger (djberg96) Summary: Bug in win32-mmap Initial Comment: Ruby 1.8.6 win32-mmap 0.2.1 Assigning the value 0 to a dynamic setter causes the corresponding getter to fail. This small script demonstrates the problem: require ''win32/mmap'' include Win32 mm = MMap.new(:size => 1024, :name => ''test'') mm.gvalue = 0 p mm.gvalue mm.close The result is: C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `load'': marshal data too short (ArgumentError) from C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `method_missing'' from mmap_test.rb:6 ---------------------------------------------------------------------->Comment By: Daniel Berger (djberg96)Date: 2007-05-16 00:58 Message: I added the explicit "\0" in CVS, but then I noticed that it fails elsewhere: mm = Win32::MMap.new(:size => 24, :name => ''test'') mm.bar = 7 mm.baz = 0 p mm.bar # Boom! p mm.baz mm.close mmap.rb:336:in `load'': marshal data too short (ArgumentError) from mmap.rb:336:in `method_missing'' from mmap.rb:399 ---------------------------------------------------------------------- Comment By: Park Heesob (phasis68) Date: 2007-05-10 08:57 Message: It''s because the return type of the MemcpyXXX is ''P''. Quick and dirty solution is like this: marshal = memcpy(buf, @address, @size) + "\0" Regards, Park Heesob ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2007-05-07 20:47 Message: (FYI to myself) This is caused by memcpy() truncating marshalled data that ends with "\000" because it treats it as a null. One solution might be to use wmemcpy() instead, but I''m not sure how to get at that function, since msvcrt doesn''t appear to export it. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85
noreply at rubyforge.org
2007-May-16 16:03 UTC
[Win32utils-devel] [ win32utils-Bugs-10589 ] Bug in win32-mmap
Bugs item #10589, was opened at 2007-05-05 04:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85 Category: win32-mmap Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Daniel Berger (djberg96) Assigned to: Daniel Berger (djberg96) Summary: Bug in win32-mmap Initial Comment: Ruby 1.8.6 win32-mmap 0.2.1 Assigning the value 0 to a dynamic setter causes the corresponding getter to fail. This small script demonstrates the problem: require ''win32/mmap'' include Win32 mm = MMap.new(:size => 1024, :name => ''test'') mm.gvalue = 0 p mm.gvalue mm.close The result is: C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `load'': marshal data too short (ArgumentError) from C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `method_missing'' from mmap_test.rb:6 ---------------------------------------------------------------------->Comment By: Park Heesob (phasis68)Date: 2007-05-17 01:03 Message: I wish this is the right solution: marshal = memcpy(buf, @address, @size) should be memcpy(buf, @address, @size) marshal = buf Regards, Park Heesob ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2007-05-16 16:58 Message: I added the explicit "\0" in CVS, but then I noticed that it fails elsewhere: mm = Win32::MMap.new(:size => 24, :name => ''test'') mm.bar = 7 mm.baz = 0 p mm.bar # Boom! p mm.baz mm.close mmap.rb:336:in `load'': marshal data too short (ArgumentError) from mmap.rb:336:in `method_missing'' from mmap.rb:399 ---------------------------------------------------------------------- Comment By: Park Heesob (phasis68) Date: 2007-05-11 00:57 Message: It''s because the return type of the MemcpyXXX is ''P''. Quick and dirty solution is like this: marshal = memcpy(buf, @address, @size) + "\0" Regards, Park Heesob ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2007-05-08 12:47 Message: (FYI to myself) This is caused by memcpy() truncating marshalled data that ends with "\000" because it treats it as a null. One solution might be to use wmemcpy() instead, but I''m not sure how to get at that function, since msvcrt doesn''t appear to export it. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85
noreply at rubyforge.org
2007-May-16 16:58 UTC
[Win32utils-devel] [ win32utils-Bugs-10589 ] Bug in win32-mmap
Bugs item #10589, was opened at 2007-05-04 12:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85 Category: win32-mmap Group: Code>Status: Closed >Resolution: AcceptedPriority: 3 Submitted By: Daniel Berger (djberg96) Assigned to: Daniel Berger (djberg96) Summary: Bug in win32-mmap Initial Comment: Ruby 1.8.6 win32-mmap 0.2.1 Assigning the value 0 to a dynamic setter causes the corresponding getter to fail. This small script demonstrates the problem: require ''win32/mmap'' include Win32 mm = MMap.new(:size => 1024, :name => ''test'') mm.gvalue = 0 p mm.gvalue mm.close The result is: C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `load'': marshal data too short (ArgumentError) from C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `method_missing'' from mmap_test.rb:6 ---------------------------------------------------------------------->Comment By: Daniel Berger (djberg96)Date: 2007-05-16 09:58 Message: Thanks, that was it! Dan ---------------------------------------------------------------------- Comment By: Park Heesob (phasis68) Date: 2007-05-16 09:03 Message: I wish this is the right solution: marshal = memcpy(buf, @address, @size) should be memcpy(buf, @address, @size) marshal = buf Regards, Park Heesob ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2007-05-16 00:58 Message: I added the explicit "\0" in CVS, but then I noticed that it fails elsewhere: mm = Win32::MMap.new(:size => 24, :name => ''test'') mm.bar = 7 mm.baz = 0 p mm.bar # Boom! p mm.baz mm.close mmap.rb:336:in `load'': marshal data too short (ArgumentError) from mmap.rb:336:in `method_missing'' from mmap.rb:399 ---------------------------------------------------------------------- Comment By: Park Heesob (phasis68) Date: 2007-05-10 08:57 Message: It''s because the return type of the MemcpyXXX is ''P''. Quick and dirty solution is like this: marshal = memcpy(buf, @address, @size) + "\0" Regards, Park Heesob ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2007-05-07 20:47 Message: (FYI to myself) This is caused by memcpy() truncating marshalled data that ends with "\000" because it treats it as a null. One solution might be to use wmemcpy() instead, but I''m not sure how to get at that function, since msvcrt doesn''t appear to export it. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85
Apparently Analagous Threads
- [ win32utils-Bugs-3924 ] Segmentation fault under Windows
- [ win32utils-Bugs-16648 ] Cannot find the file specified with Service.services
- [ win32utils-Bugs-2532 ] Etc::Admin.configure_group problem
- [ win32utils-Bugs-4101 ] create hash param
- [ win32utils-Feature Requests-3502 ] Allow win32-open3 to take a block