[#81999] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — ko1@...
Issue #13737 has been updated by ko1 (Koichi Sasada).
4 messages
2017/07/11
[#82005] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — nobu@...
Issue #13737 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/07/12
[#82102] Re: register_fstring_tainted:FL_TEST_RAW(str, RSTRING_FSTR) — Eric Wong <normalperson@...>
Koichi Sasada <ko1@atdot.net> wrote:
4 messages
2017/07/18
[#82151] [Ruby trunk Feature#13637] [PATCH] tool/runruby.rb: test with smallest possible machine stack — Rei.Odaira@...
Issue #13637 has been updated by ReiOdaira (Rei Odaira).
3 messages
2017/07/24
[ruby-core:81980] [Ruby trunk Bug#13545] Ruby built by clang 4.0.0 parses Float literal wrongly
From:
nagachika00@...
Date:
2017-07-09 19:51:49 UTC
List:
ruby-core #81980
Issue #13545 has been updated by nagachika (Tomoyuki Chikanaga).
Backport changed from 2.2: REQUIRED, 2.3: DONE, 2.4: REQUIRED to 2.2: REQUIRED, 2.3: DONE, 2.4: DONE
ruby_2_4 r59298 merged revision(s) 58796.
----------------------------------------
Bug #13545: Ruby built by clang 4.0.0 parses Float literal wrongly
https://bugs.ruby-lang.org/issues/13545#change-65707
* Author: mame (Yusuke Endoh)
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
* ruby -v:
* Backport: 2.2: REQUIRED, 2.3: DONE, 2.4: DONE
----------------------------------------
~~~
$ ./configure --prefix=/home/mame/work/local CC=clang
$ make -j 4 miniruby
$ ./miniruby -e 'p 1.1851510441583988e+30'
1.1851510441583981e+30
~~~
See the last digit. While the original literal ends with "8e+30", the result ends with "1e+30". The version of clang is 4.0.0-1ubuntu1.
There seems to be a bug in `ruby_strtod`. It manipulates a double variable as an integer variable by using cast. I think that this is undefined behavior, and clang seems to optimize some operations out.
We can fix this issue by adding `volatile` to its variable declaration, but I'm unsure if this is a good solution.
~~~
diff --git a/util.c b/util.c
index 4ae7c4fc96..ecd55bb0c5 100644
--- a/util.c
+++ b/util.c
@@ -1832,7 +1832,7 @@ d2b(double d_, int *e, int *bits)
static double
ratio(Bigint *a, Bigint *b)
{
- double_u da, db;
+ volatile double_u da, db;
int k, ka, kb;
dval(da) = b2d(a, &ka);
~~~
--
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>