[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-core
Subject:    [ruby-core:94068] [Ruby master Bug#16030] test_memsize fails on x32 ABI: Unsupported RVALUE_SIZE=24
From:       greenreaper () hotmail ! com
Date:       2019-07-31 7:29:44
Message-ID: redmine.issue-16030.20190731072944.c011c015e3ef0812 () ruby-lang ! org
[Download RAW message or body]

Issue #16030 has been reported by GreenReaper (Laurence Parry).

----------------------------------------
Bug #16030: test_memsize fails on x32 ABI: Unsupported RVALUE_SIZE=24
https://bugs.ruby-lang.org/issues/16030

* Author: GreenReaper (Laurence Parry)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux-gnux32]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Tests fail on Debian's build system for the x32 ABI port for `ruby-2.5` over a single \
issue: https://buildd.debian.org/status/package.php?p=ruby2.5&suite=sid#problem-6
```
  1) Failure:
TestTime#test_memsize [/<<PKGBUILDDIR>>/test/ruby/test_time.rb:1160]:
Unsupported RVALUE_SIZE=24, update test_memsize
```
The full log is at https://buildd.debian.org/status/fetch.php?pkg=ruby2.5&arch=x32&ver=2.5.5-4&stamp=1564494509&raw=0


I believe the necessary change is to add the line:
``` ruby
    when 24 then expect = 54
```

to `def test_memsize` at the end of `ruby/test/ruby/test_time.rb`, based on the \
following test I ran:

```
require 'test/unit'
require 'delegate'
require 'timeout'
require 'delegate'
require 'objspace'
t = Time.at(0)
size = GC::INTERNAL_CONSTANTS[:RVALUE_SIZE]
puts size
puts ObjectSpace.memsize_of(t)
```
which output `24` and `54` respectively.

On x32, time_t is 64-bit, but pointers are 32-bit, so it makes sense that it's just 4 \
more than the 20 case for regular 32-bit.

Previous email to Debain maintainers:
https://www.mail-archive.com/pkg-ruby-extras-maintainers@alioth-lists.debian.net/msg04431.html


Debian bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=920017



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic