[#102393] [Ruby master Feature#17608] Compact and sum in one step — sawadatsuyoshi@...

Issue #17608 has been reported by sawa (Tsuyoshi Sawada).

13 messages 2021/02/04

[#102438] [Ruby master Bug#17619] if false foo=42; end creates a foo local variable set to nil — pkmuldoon@...

Issue #17619 has been reported by pkmuldoon (Phil Muldoon).

10 messages 2021/02/10

[#102631] [Ruby master Feature#17660] Expose information about which basic methods have been redefined — tenderlove@...

Issue #17660 has been reported by tenderlovemaking (Aaron Patterson).

9 messages 2021/02/27

[#102639] [Ruby master Misc#17662] The herdoc pattern used in tests does not syntax highlight correctly in many editors — eregontp@...

Issue #17662 has been reported by Eregon (Benoit Daloze).

13 messages 2021/02/27

[#102652] [Ruby master Bug#17664] Behavior of sockets changed in Ruby 3.0 to non-blocking — ciconia@...

Issue #17664 has been reported by ciconia (Sharon Rosner).

23 messages 2021/02/28

[ruby-core:102511] [Ruby master Bug#17606] Make failed on i386-cygwin (miniruby.exe aborted)

From: xtkoba+ruby@...
Date: 2021-02-16 00:27:18 UTC
List: ruby-core #102511
Issue #17606 has been updated by xtkoba (Tee KOBAYASHI).

File ruby-iseq_inline_constant_cache_entry.patch added

Consider the following code, in which all the assertions would be expected to hold:
```
#include <assert.h>
#include <stddef.h>

/* excerpts from rb_mjit_header.h */
typedef unsigned long VALUE;
typedef unsigned long long rb_serial_t;
typedef void *rb_cref_t; /* a pointer type */

/* from vm_core.h */
struct iseq_inline_constant_cache_entry {
    VALUE flags;

    VALUE value;              // v0
    const rb_cref_t *ic_cref; // v1
    rb_serial_t ic_serial;    // v2
                              // v3
};

/* from ractor.c */
struct RVALUE {
    VALUE flags;
    VALUE klass;
    VALUE v1;
    VALUE v2;
    VALUE v3;
};

int main() {
  assert(offsetof(struct iseq_inline_constant_cache_entry, flags) == offsetof(struct RVALUE, flags));
  assert(offsetof(struct iseq_inline_constant_cache_entry, value) == offsetof(struct RVALUE, klass));
  assert(offsetof(struct iseq_inline_constant_cache_entry, ic_cref) == offsetof(struct RVALUE, v1));
  
  /* the following assertion fails on i686-cygwin */
  assert(offsetof(struct iseq_inline_constant_cache_entry, ic_serial) == offsetof(struct RVALUE, v2));
  
  return 0;
}
```

Actually the last assertion does not hold, due to the padding in `struct iseq_inline_constant_cache_entry`.

A workaround is to use the pack pragma, as in the attached patch.

----------------------------------------
Bug #17606: Make failed on i386-cygwin (miniruby.exe aborted)
https://bugs.ruby-lang.org/issues/17606#change-90405

* Author: fd0 (Daisuke Fujimura)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.1.0dev (2021-02-01T20:20:34Z master 8ef30bcc04) [i386-cygwin]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
Make failed on i386-cygwin (miniruby.exe aborted)

```
$ git clone https://github.com/ruby/ruby.git
$ cd ruby
$ (./configure && make V=1) |& tee i386-cygwin-make.log 2>&1
(snip)
./miniruby.exe -I./lib -I. -I.ext/common  ./tool/generic_erb.rb -c -o encdb.h ./template/encdb.h.tmpl ./enc enc
<internal:timev>:9: [BUG] vm_get_cref: unreachable
ruby 3.1.0dev (2021-02-01T20:20:34Z master 8ef30bcc04) [i386-cygwin]

-- Control frame information -----------------------------------------------
c:0002 p:0012 s:0006 e:000005 TOP    <internal:timev>:9 [FINISH]
c:0001 p:0000 s:0003 E:ffffe4f8 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
<internal:timev>:9:in `<internal:timev>'

-- Other runtime information -----------------------------------------------

* Loaded script: ./miniruby

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 fiber.so
    3 rational.so
    4 complex.so
    5 ruby2_keywords.rb

make: *** [uncommon.mk:1098: encdb.h] Aborted (core dumped)
$
```

This problem seems to have occurred since e7fc353f044f9280222ca41b029b1368d2bf2fe3.

- https://github.com/ruby/ruby/commit/e7fc353f044f9280222ca41b029b1368d2bf2fe3


(I am aware that it may not be possible to fix it because of the absence of an active maintainer for cygwin.)

---Files--------------------------------
i386-cygwin-make.log (107 KB)
ruby-iseq_inline_constant_cache_entry.patch (432 Bytes)


-- 
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>

In This Thread