Project

General

Profile

Actions

Bug #16030

closed

test_memsize fails on x32 ABI: Unsupported RVALUE_SIZE=24

Added by GreenReaper (Laurence Parry) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux-gnux32]
[ruby-core:94068]

Description

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:

    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

Actions

Also available in: Atom PDF

Like0
Like0