[#84867] [Ruby trunk Bug#14357] thread_safe tests suite segfaults โ€” v.ondruch@...

Issue #14357 has been reported by vo.x (Vit Ondruch).

11 messages 2018/01/15
[#85364] Re: [Ruby trunk Bug#14357] thread_safe tests suite segfaults โ€” Eric Wong <normalperson@...> 2018/02/03

v.ondruch@tiscali.cz wrote:

[#84980] [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid โ€” hsbt@...

Issue #13618 has been updated by hsbt (Hiroshi SHIBATA).

10 messages 2018/01/23
[#85012] Re: [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid โ€” Eric Wong <normalperson@...> 2018/01/23

hsbt@ruby-lang.org wrote:

[ruby-core:84585] [Ruby trunk Bug#14260] test failure related with proc arity on 32-bit environment (e.g. Solaris 10 with 32-bit compile)

From: shyouhei@...
Date: 2018-01-02 06:59:20 UTC
List: ruby-core #84585
Issue #14260 has been updated by shyouhei (Shyouhei Urabe).


ngoto (Naohisa Goto) wrote:
> >>   ใƒ“ใƒƒใƒˆใƒ•ใ‚ฃใƒผใƒซใƒ‰ใฎใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใฏ unsigned int ใจใ„ใ†ใฎใŒCใฎ่ฆๆ ผใซใฆๅฎšใ‚ใ‚‰ใ‚Œใฆใ„ใพใ™ใŒใ€
> 
> >ใ”ใ‚ใ‚“ใชใ•ใ„ใ€ใ„ใพๅฎถใซใ„ใฆCใฎ่ฆๆ ผใซใ‚ขใ‚ฏใ‚ปใ‚นใงใใชใ„ใฎใงใ™ใŒใ€ใใฎใ‚ˆใ†ใช่ฆๅฎšใŒใ‚ใฃใŸ่จ˜ๆ†ถใŒใชใ„ใงใ™ใ€‚ใฉใ“ใฎใ‚ปใ‚ฏใ‚ทใƒงใƒณใซๆ›ธใ„ใฆใ‚ใ‚Šใพใ—ใŸใงใ—ใ‚‡ใ†ใ‹?
> 
> ใ”ๆŒ‡ๆ‘˜ใฎใจใŠใ‚Šใ€ๅ…ƒใฎ่จ˜่ฟฐใฏ้–“้•ใ„ใงใ—ใŸใ€‚
> ๆญฃใ—ใใฏ implementation-defined ใงใ—ใŸใฎใง่จ‚ๆญฃใ—ใพใ™ใ€‚ใ”ๆŒ‡ๆ‘˜ใ‚ใ‚ŠใŒใจใ†ใ”ใ–ใ„ใพใ—ใŸใ€‚
> 
> ๅŽŸๆœฌใฏ็งใ‚‚ๆ‰‹ๅ…ƒใซใฏ็„กใ„ใฎใงใ™ใŒใ€C99 ใงใฏ 6.7.2.1 ใซๆ›ธใ‹ใ‚Œใฆใ„ใ‚‹ใจใฎใ“ใจใงใ™ใ€‚
> ๅ‚่€ƒใซใ—ใŸใƒšใƒผใ‚ธ: http://en.cppreference.com/w/c/language/bit_field
> 
> Oracle Solaris Studio ใ‚„ IBM ใฎใ‚ณใƒณใƒ‘ใ‚คใƒฉใงใฏๆœชๆŒ‡ๅฎšใฎintใฏ unsigned ๆ‰ฑใ„ใซใชใ‚‹ใจใฎ่จ˜่ฟฐใ‚’่ฆ‹ใคใ‘ใฆใ„ใŸใ“ใจใ‚‚ใ‚ใ‚Šใ€ๅ‹˜้•ใ„ใ—ใฆใ„ใพใ—ใŸใ€‚
> 
> Oracle: https://docs.oracle.com/cd/E19205-01/820-1209/bjayo/index.html
> 
> IBM: https://www.ibm.com/support/knowledgecenter/en/SSQ2R2_8.5.1/com.ibm.tpf.toolkit.compilers.doc/ref/langref_zos/clrc03defbitf.htm
> 
> ไธ€ๆ–นใ€GCCใงใฏ singed ใจใฎใ“ใจใงใ™ใ€‚
> https://gcc.gnu.org/onlinedocs/gcc-5.2.0/gcc/Structures-unions-enumerations-and-bit-fields-implementation.html
> 
> ใชใŠใ€๏ผˆๅฐ‘ใชใใจใ‚‚ๆœ€่ฟ‘ใฎ๏ผ‰ GCC ใ‚„ Oracle Developer Studio ใงใฏใ‚ณใƒณใƒ‘ใ‚คใƒซๆ™‚ใฎใ‚ชใƒ—ใ‚ทใƒงใƒณใงๅค‰ๆ›ดๅฏ่ƒฝใจใฎใ“ใจใงใ™ใ€‚

่ชฟๆŸปใ—ใฆใ„ใŸใ ใ„ใฆใ‚ใ‚ŠใŒใจใ†ใ”ใ–ใ„ใพใ—ใŸใ€‚ใใฎใ‚ˆใ†ใช็Šถๆณใงใ‚ใ‚Œใฐ่ฃธใฎintใฎๅˆฉ็”จใฏๆŽงใˆใฆsignedใ‹unsignedใ‚’ๆ˜Ž็คบใ—ใŸใปใ†ใŒ่‰ฏใ•ใใ†ใงใ™ใญใ€‚ไฟฎๆญฃใฏๅฆฅๅฝ“ใใ†ใ ใจๆ€ใ„ใพใ—ใŸใ€‚

----------------------------------------
Bug #14260: test failure related with proc arity on 32-bit environment (e.g. Solaris 10 with 32-bit compile)
https://bugs.ruby-lang.org/issues/14260#change-69124

* Author: ngoto (Naohisa Goto)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.3: DONTNEED, 2.4: DONTNEED, 2.5: REQUIRED
----------------------------------------
ใŠใใ‚‰ใ r59358 ไปฅ้™ใ€sparc ใฎ Solaris 10 ไธŠใฎ Oracle Developer Studio (Oracle Solaris Studio) 12.x ใซใฆ 32ใƒ“ใƒƒใƒˆใงใ‚ณใƒณใƒ‘ใ‚คใƒซใ—ใŸ้š›ใ€
make test-all ใซใฆไปฅไธ‹ใฎใ‚ˆใ†ใช failure ใŒๅ‡บใ‚‹ใ‚ˆใ†ใซใชใ‚Šใพใ—ใŸใ€‚
(ไปฅไธ‹ใฏ r61515 ใงใฎ็ตๆžœ)

~~~
  1) Failure:
TestLazyEnumerator#test_each_cons_limit [/XXXXX/test/ruby/test_lazy_enumerator.rb:548]:
<[[1, 2], [2, 3]]> expected but was
<[[2, 3], [2, 3]]>.

  2) Failure:
TestProc#test_bound_parameters [/XXXXX/test/ruby/test_proc.rb:1184]:
<[[:rest]]> expected but was
<[]>.

  3) Failure:
TestEnumerator#test_cons [/XXXXX/test/ruby/test_enumerator.rb:118]:
<[[1, 2, 3],
 [2, 3, 4],
 [3, 4, 5],
 [4, 5, 6],
 [5, 6, 7],
 [6, 7, 8],
 [7, 8, 9],
 [8, 9, 10]]> expected but was
<[[8, 9, 10],
 [8, 9, 10],
 [8, 9, 10],
 [8, 9, 10],
 [8, 9, 10],
 [8, 9, 10],
 [8, 9, 10],
 [8, 9, 10]]>.

  4) Failure:
TestEnumerator#test_slice [/XXXXX/test/ruby/test_enumerator.rb:113]:
<[[1, 2, 3], [4, 5, 6], [7, 8, 9], [10]]> expected but was
<[[10], [10], [10], [10]]>.

๏ผˆไธญ็•ฅ๏ผ‰

  6) Failure:
TestProc#test_arity2 [/XXXXX/test/ruby/test_proc.rb:439]:
<-1> expected but was
<0>.

  7) Failure:
TestLazyEnumerator#test_each_slice_limit [/XXXXX/test/ruby/test_lazy_enumerator.rb:554]:
<[[1, 2], [3, 4]]> expected but was
<[[3, 4], [3, 4]]>.

๏ผˆๅพŒ็•ฅ๏ผ‰
~~~

็ต่ซ–ใ‹ใ‚‰่จ€ใ†ใจไปฅไธ‹ใฎใƒ‘ใƒƒใƒใงๆฒปใ‚Šใพใ—ใŸใ€‚

ใƒ“ใƒƒใƒˆใƒ•ใ‚ฃใƒผใƒซใƒ‰ใฎใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใฏ unsigned int ใจใ„ใ†ใฎใŒCใฎ่ฆๆ ผใซใฆๅฎšใ‚ใ‚‰ใ‚Œใฆใ„ใพใ™ใŒใ€
max ใซ -1 ๏ผˆใƒžใ‚ฏใƒญ UNLIMITED_ARGUMENTS ใฎๅ€ค๏ผ‰ใŒไปฃๅ…ฅใ•ใ‚Œใ‚‹ๅ ดๅˆใŒใ‚ใ‚Šใ€
ใ“ใ‚ŒใŒ unsigned int : 16 ใงใฏ 65535 ใŒไปฃๅ…ฅใ•ใ‚ŒใŸใฎใจๅŒใ˜ใƒ“ใƒƒใƒˆๅˆ—ใซใชใ‚Šใ€
ใใ‚Œใ‚’ๅ†ๅบฆ signed int ใซๆˆปใ™้š›ใซใ€ใใฎใพใพ 65535 ใŒๆˆปใ•ใ‚Œใ€ใคใพใ‚Šๆ„ๅ›ณใ—ใชใ„ๅ€คใซๅŒ–ใ‘ใฆใ—ใพใ„ใ€
๏ผˆใ“ใ“ใ‚‰ใธใ‚“ใฎๅ‡ฆ็†ใฏใ€Cใฎ่ฆๆ ผใงใฏใŠใใ‚‰ใๅ‡ฆ็†็ณปไพๅญ˜ใจใ•ใ‚Œใฆใ„ใ‚‹ใจๆ€ใ„ใพใ™๏ผ‰
arityใ‚’ UNLIMITED_ARGUMENTS ใ‚„ 0 ใจๆฏ”่ผƒใ™ใ‚‹ๅˆคๅฎš็ตๆžœใŒ็•ฐๅธธใซใชใ‚Šใ€
ไธŠ่จ˜ใฎFailureใŒ็™บ็”Ÿใ—ใŸใ‚ˆใ†ใงใ™ใ€‚

ใชใŠใ€64ใƒ“ใƒƒใƒˆใงใ‚ณใƒณใƒ‘ใ‚คใƒซใ™ใ‚‹ใจ `#else` ไปฅไธ‹ใฎ `int min, max;` ใŒไฝฟใ‚ใ‚Œใ€ใƒ“ใƒƒใƒˆใƒ•ใ‚ฃใƒผใƒซใƒ‰ใงใฏใชใใชใ‚‹ใŸใ‚ใ€ใ“ใฎFailreใฏ็™บ็”Ÿใ—ใพใ›ใ‚“ใ€‚
ใพใŸใ€gcc ใงใฏ 16 ใƒ“ใƒƒใƒˆใฎใพใพ็ฌฆๅทใ‚ใ‚Šใฎ -1 ใซใ—ใฆใ‹ใ‚‰ๆˆปใ—ใฆใใ‚Œใ‚‹๏ผˆๅ ดๅˆใ‚‚ใ‚ใ‚‹๏ผŸ๏ผ‰ใ‚ˆใ†ใงใ€๏ผˆๅคง้ƒจๅˆ†ใฎ๏ผŸ๏ผ‰Failureใฏ็™บ็”Ÿใ—ใชใ„ใ‚ˆใ†ใงใ™๏ผˆใŒไธ€้ƒจใŠใ‹ใ—ใ„้ƒจๅˆ†ใŒใ‚ใฃใŸใฃใฝใ„๏ผŸ๏ผ‰ใ€‚

~~~
--- internal.h  (revision 61515)                                                
+++ internal.h  (working copy)                                                  
@@ -912,12 +912,12 @@
 
 /* IFUNC (Internal FUNCtion) */
 
 struct vm_ifunc_argc {
 #if SIZEOF_INT * 2 > SIZEOF_VALUE
-    int min: (SIZEOF_VALUE * CHAR_BIT) / 2;
-    int max: (SIZEOF_VALUE * CHAR_BIT) / 2;
+    signed int min: (SIZEOF_VALUE * CHAR_BIT) / 2;
+    signed int max: (SIZEOF_VALUE * CHAR_BIT) / 2;
 #else
     int min, max;
 #endif
 };
 
~~~

ไปŠๅ›žใ€FailureใŒ็™บ็”Ÿใ—ใŸใฎใฏ Solaris ใ ใ‘ใงใ™ใŒใ€ๅ…จใฆใฎ32ใƒ“ใƒƒใƒˆ็’ฐๅขƒใซใฆๆฝœๅœจ็š„ใซๅ•้กŒใŒ็™บ็”Ÿใ™ใ‚‹ๅฏ่ƒฝๆ€งใŒใ‚ใ‚‹ใ‚ณใƒผใƒ‰ใ ใฃใŸใจ่จ€ใˆใพใ™ใ€‚

ใใ—ใฆใ€ใƒ“ใƒƒใƒˆใƒ•ใ‚ฃใƒผใƒซใƒ‰ใงใƒกใƒขใƒชใ‚’็ฏ€็ด„ใ—ใฆใ„ใ‚‹็ฎ‡ๆ‰€ใฏไป–ใซใ‚‚่ค‡ๆ•ฐใ‚ใ‚‹ใจๆ€ใ„ใพใ™ใŒใ€unsigned int ๆ‰ฑใ„ใง็ขบใ‹ใซๆญฃใ—ใ„ใ‹ใ€่ฒ ใฎๅ€คใ‚’ๆ„ๅ›ณใ›ใšไปฃๅ…ฅใ—ใฆใ„ใชใ„ใ‹ใ€ๅฟตใฎใŸใ‚็ท็‚นๆคœใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚‹ใ‹ใ‚‚ใ—ใ‚Œใชใ„ใจๆ€ใ„ใพใ—ใŸใ€‚




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

Prev Next