Project

General

Profile

Activity

From 08/12/2021 to 08/18/2021

08/18/2021

11:04 PM Feature #18083: Capture error in ensure block.
There are lots of ways to achieve this but the reality is there is a lot of code which uses `$!` in the ensure block which is incorrect for the reasons already explained.
Your proposed ideas are fine, except that RuboCop will warn you a...
ioquatix (Samuel Williams)
05:09 PM Feature #18083: Capture error in ensure block.
If you only need to know if there is an `Exception` this seems easier:
Using the example from https://bugs.ruby-lang.org/issues/15567#note-27
```ruby
begin
...
rescue Exception => exception
transaction.abort
raise exception
ensure
...
Eregon (Benoit Daloze)
05:04 PM Feature #18083: Capture error in ensure block.
The second snippet seems clear, the first one much less.
In what cases `error` is set? If it's a StandardError? If it's an Exception? If it's any kind of "Ruby exception"?
IMHO this pattern is rarely enough needed that the second sni...
Eregon (Benoit Daloze)
03:09 AM Feature #18083: Capture error in ensure block.
By the way, perhaps we should consider deprecating `$!` since its usage can lead to incorrect behaviour. ioquatix (Samuel Williams)
03:03 AM Feature #18083 (Open): Capture error in ensure block.
As discussed in https://bugs.ruby-lang.org/issues/15567 there are some tricky edge cases.
As a general model, something like the following would be incredibly useful:
``` ruby
begin
...
ensure => error
pp "error occurred" if...
ioquatix (Samuel Williams)
09:29 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
vo.x (Vit Ondruch) wrote in #note-22:
> The dumps should be available here: https://vondruch.fedorapeople.org/objdump.tar.gz
I'm afraid that this contains only `.debug_info` and not `.debug_abbrev`.
It seems that `objdump` can dum...
xtkoba (Tee KOBAYASHI)
08:19 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
xtkoba (Tee KOBAYASHI) wrote in #note-21:
> Isn't it possible that either section is broken?
Well, it should be DWARF5, which is pretty recent and on ppc64le, so there might be some surprises ...
> ...
The dumps should be availabl...
vo.x (Vit Ondruch)
06:08 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
The message
```
1267: Abbrev Number 106 not found
```
means that `addr2line.c` could not find an abbrev table entry in `.debug_abbrev` referenced from `.debug_info`. Isn't it possible that either section is broken?
It might be...
xtkoba (Tee KOBAYASHI)
05:34 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
The result with the latest patch is significantly different:
~~~
$ gdb --args ./miniruby -e'Process.kill("SIGSEGV",$$)'
GNU gdb (GDB) Fedora 10.2-6.fc35
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL ver...
vo.x (Vit Ondruch)
09:06 PM Bug #17823: addr2line.c: Interpret `DW_RLE_start_length`
An edited patch is attached so that it applies cleanly to the current master head. xtkoba (Tee KOBAYASHI)
08:44 PM Bug #18117 (Closed): Segmentation fault when yielding values from Ractors during GC sweeping
[Link for GitHub PR containing the fix](https://github.com/ruby/ruby/pull/4755)
Ractors may invoke `rb_objspace_reachable_objects_from` when yielding values back to the main-Ractor. If this occurs during a sweeping pass of the GC, the...
vinistock (Vinicius Stock)
04:51 PM Bug #18077: Marshal.dump(closed_io) raises IOError instead of TypeError
Why does IO#internal_encoding (and external_encoding) raise if the IO is closed?
They could just return the encoding, it's still stored in in the IO instance, and we are not trying to access the `fd`, right?
JRuby 9.2.17.0 does not r...
Eregon (Benoit Daloze)
03:14 PM Bug #18077: Marshal.dump(closed_io) raises IOError instead of TypeError
https://github.com/ruby/ruby/pull/4749 is another fix without the above side effect. Is it OK? larskanis (Lars Kanis)
02:25 PM Feature #12075: some container#nonempty?
p8 (Petrik de Heus) wrote in #note-25:
> What about `ary.filled?` ?
> ...
I think `filled?` is a perfect method name. You nailed it.
Or, if you are going with past participles, perhaps `loaded?` may also work.
sawa (Tsuyoshi Sawada)
01:21 PM Feature #12075: some container#nonempty?
Boolean `size?` looks good to me. I vote for it.
My first choice was `nonempty?` because this is very common word in popular algorithm text books, e.g., Knuth, Cormen, Sedgewick, Tarjan, Aho, Hopcroft, etc.
However some people pointed ...
gotoken (Kentaro Goto)
12:37 PM Revision 0b7969b6 (git): Silence LoadError only if it is for `rubygems` itself
Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
daniel_niknam (Daniel Niknam)
09:24 AM Revision d668cd18 (git): rb_fix2uint should use FIXNUM_NEGATIVE_P
rb_num_negative_int_p is equivalent to calling the "<" method on
Integer (and checking whether it is overridden), where in this case we
are interested in whether the "actual" value can fit inside an unsigned
int.
This also was slow beca...
jhawthorn (John Hawthorn)
09:18 AM Bug #18084 (Closed): `JSON.dump` can crash VM.
Applied in changeset commit:git|574f3af36ea008896419d2e2407f8fce83bdcd2e.
----------
Rewind execution tags more at stack overflow [Bug #18084]
nobu (Nobuyoshi Nakada)
05:38 AM Bug #18084: `JSON.dump` can crash VM.
https://github.com/ruby/ruby/pull/4751 nobu (Nobuyoshi Nakada)
04:20 AM Bug #18084: `JSON.dump` can crash VM.
@nobu suggested the following code could be updated:
~~~ clang
sigill(int sig SIGINFO_ARG)
{
check_reserved_signal("ILL");
#if defined __APPLE__
CHECK_STACK_OVERFLOW();
#endif
~~~
we could also do this on Linux?
ioquatix (Samuel Williams)
04:17 AM Bug #18084: `JSON.dump` can crash VM.
Minor improvement to formatting. ioquatix (Samuel Williams)
04:17 AM Bug #18084 (Closed): `JSON.dump` can crash VM.
~~~ ruby
require 'json'
x = {}; x[:x] = x
JSON.dump(x) # => nil
JSON.dump(x) # => SIGILL
~~~
Results from our friendly all ruby bot:
~~~
:x: 1.8
-:1:in `require': no such file to load -- json (LoadError)
from -:1
e...
ioquatix (Samuel Williams)
08:23 AM Revision 95e7aed8 (git): SIGILL can raise at stack overflow on Linux too [Bug #18084]
nobu (Nobuyoshi Nakada)
08:23 AM Revision 574f3af3 (git): Rewind execution tags more at stack overflow [Bug #18084]
nobu (Nobuyoshi Nakada)
04:18 AM Bug #5808: "a = []; a << a; puts JSON.dump(a)" aborted
https://bugs.ruby-lang.org/issues/18084 maybe regression. ioquatix (Samuel Williams)
03:08 AM Misc #18039: DevelopersMeeting20210819Japan
- [Feature #18083] Capture error in ensure block.
- Is it acceptable?
ioquatix (Samuel Williams)
03:00 AM Feature #15567 (Rejected): Allow ensure to match specific situations
I will make a more limited proposal. ioquatix (Samuel Williams)

08/17/2021

10:55 PM Bug #16906: Calling Thread#thread_variable? in IRB sometimes produce wrong result
This needs to be backported to 2.7.x. It wasn't fixed in 2.7.4. greneholt (Connor McKay)
05:39 PM Bug #18076: ext/digest/md5/md5.c: `-Wnull-pointer-subtraction` warning by Clang 13
Proposed patch:
```diff
--- a/ext/digest/md5/md5.c
+++ b/ext/digest/md5/md5.c
@@ -225,7 +225,7 @@
uint32_t xbuf[16];
const uint32_t *X;

- if (!((data - (const uint8_t *)0) & 3)) {
+ if (!(((uintptr_t)data) & ...
xtkoba (Tee KOBAYASHI)
05:25 PM Revision 58bd9434 (git): Replace f_boolcast with RBOOL macro
* Move f_boolcast definination
* Remove f_boolcast macro defination
* to
S_H_ (Shun Hiraoka)
04:26 PM Misc #18082 (Open): FileUtils.remove_entry_secure has inconsistent document
`FileUtils.remove_entry_secure` and `FileUtils.rm_r` have inconsistency about the vulnerability condition the in the documentations.
`remove_entry_secure` document:
https://github.com/ruby/ruby/blob/6a9bfa4d9387b9d8f07f43f4546437be57...
pocke (Masataka Kuwabara)
03:00 PM Revision 6a9bfa4d (git): * 2021-08-18 [ci skip]
git[bot]
02:16 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
FWIW, another bug is found in `addr2line.c` (#18081), which I believe is irrevant to the issue here, though. xtkoba (Tee KOBAYASHI)
10:06 AM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
A revised patch (from #note-17) is attached so that `abbrev_number >= 256` is handled properly, although it might be practically not going to happen. xtkoba (Tee KOBAYASHI)
07:52 AM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
It turns out that `di_read_debug_abbrev_cu` in `addr2line.c` does not work correctly when `abbrev_number` is not aligned in ascending order for each CU entry of `.debug_abbrev`. A patch is attached to fix this.
Note again that I canno...
xtkoba (Tee KOBAYASHI)
02:09 PM Bug #18081 (Feedback): addr2line.c: Wrong section for `DW_AT_ranges`
When both `.debug_rnglists` and `.debug_ranges` sections exist, `DW_AT_ranges` can refer to a wrong section, potentially causing a segmentation fault.
`DW_AT_ranges` should refer to `.debug_rnglists` for DWARF version 5, and `.debug_r...
xtkoba (Tee KOBAYASHI)
01:57 PM Revision 36ae44ce (git): [ruby/date] Update zonetab.h at 2021-08-11
https://github.com/ruby/date/commit/de7dca353f nobu (Nobuyoshi Nakada)
12:44 PM Revision 48145282 (git): [DOC] Fix the rdoc for File::Stat#size? [ci skip]
Akinori MUSHA
09:45 AM Revision edf01d4e (git): Treat NULL fake string as an empty string
And the NULL string must be of size 0. nobu (Nobuyoshi Nakada)
09:29 AM Bug #18007: Help developers of C extensions meet requirements in "doc/extension.rdoc"
Eregon (Benoit Daloze) wrote in #note-7:
> I'm confused, why does `Class#allocate` not simply use the alloc function set with `rb_define_alloc_func`?
You're confused by `Class#allocate` which calls the allocator set for each `T_DATA`...
nobu (Nobuyoshi Nakada)
08:25 AM Bug #18007: Help developers of C extensions meet requirements in "doc/extension.rdoc"
I'm confused, why does `Class#allocate` not simply use the alloc function set with `rb_define_alloc_func`?
Then there would be no need to undefine/redefine allocate, isn't it?
(IMHO users should never call `allocate` directly because...
Eregon (Benoit Daloze)
06:44 AM Bug #18007: Help developers of C extensions meet requirements in "doc/extension.rdoc"
mame (Yusuke Endoh) wrote in #note-5:
> How about raising an exception when attempting to allocate a `T_DATA` object with the default allocator?
Though I agreed it once, no way to tell if the given class is `T_DATA` in the default al...
nobu (Nobuyoshi Nakada)
06:01 AM Bug #18007: Help developers of C extensions meet requirements in "doc/extension.rdoc"
How about raising an exception when attempting to allocate a `T_DATA` object with the default allocator? mame (Yusuke Endoh)
08:16 AM Bug #16889: TracePoint.enable { ... } also activates the TracePoint for other threads, even outside the block
Actually thread-local might not be enough, we'd probably want Fiber local, i.e., events which are on the same execution stack and contain that enable block call on the stack.
Is there any way to have a TracePoint for a particular Fiber?
Eregon (Benoit Daloze)
08:12 AM Bug #16889: TracePoint.enable { ... } also activates the TracePoint for other threads, even outside the block
mame (Yusuke Endoh) wrote in #note-7:
> Note that the second `trace.enable` does not print `#<TracePoint:line t.rb:4 in 'foo'>`.
A very good point, that I thought about when talking a bit with Koichi about this, some time before fili...
Eregon (Benoit Daloze)
05:24 AM Bug #16889: TracePoint.enable { ... } also activates the TracePoint for other threads, even outside the block
mame (Yusuke Endoh) wrote in #note-7:
> `TracePoint#enable(target: :block)` does not follow events in a called method. Is this really intentional?
> ...
This matches the behavior of passing the block explicitly and using it as the targ...
jeremyevans0 (Jeremy Evans)
05:19 AM Bug #16889: TracePoint.enable { ... } also activates the TracePoint for other threads, even outside the block
+1 for Jeremy #6.
I also agree `TP#enable{ ... }` should be thread-local without any options, but I don't think it is valuable to change the default behaver (break compatibility).
ko1 (Koichi Sasada)
05:09 AM Bug #16889: TracePoint.enable { ... } also activates the TracePoint for other threads, even outside the block
`TracePoint#enable(target: :block)` does not follow events in a called method. Is this really intentional?
```
trace = TracePoint.new(:line) {|tp| p tp }
def foo
1
end
trace.enable do
foo
end
#=>
# #<TracePoint:line t...
mame (Yusuke Endoh)
08:15 AM Feature #17750 (Closed): Update Unicode data to Unicode Version 13.0.0
Closed (finally) with revision 21fd83a823. duerst (Martin Dürst)
08:08 AM Revision 21fd83a8 (git): Mention update to Unicode Version 13.0.0 and Emoji Version 13.1
Mention the update to Unicode Version 13.0.0 and Unicode Emoji
Version 13.1 in NEWS.md. This completes issue #17750. [ci skip]
duerst (Martin Dürst)
07:44 AM Bug #18027 (Closed): test/ruby/enc/test_emoji_breaks.rb does not use the file emoji-variation-sequences.txt
Resolved with commit fd7f61c.
It turned out the problem was that in emoji-variation-sequences.txt, lines look like
`0023 FE0E ; text style ; # (1.1) NUMBER SIGN`
whereas in the other two files that we processed the same...
duerst (Martin Dürst)
06:45 AM Bug #18027: test/ruby/enc/test_emoji_breaks.rb does not use the file emoji-variation-sequences.txt
duerst (Martin Dürst) wrote:
> In particular, I'm a `puts` debugger, but `puts` debugging doesn't seem to work well when testing.
I found that adding and using the following method in the Test... class allowed me to use `log_test` ...
duerst (Martin Dürst)
07:30 AM Revision de764ae8 (git): * 2021-08-17 [ci skip]
git[bot]
07:16 AM Bug #13864: Rinda multicast test failures due to missing default route
Thx for looking into this. I just wanted to point out that this has low importance for me, since the default route was added in mock: https://github.com/rpm-software-management/mock/commit/a1a3ddaa41c0a2b5d17b004bdf3b87a1337eaecc vo.x (Vit Ondruch)
07:03 AM Revision fd7f61cf (git): Take into account data in emoji-variation-sequences.txt in tests.
The emoji data in emoji-variation-sequences.txt was not used for
in test/ruby/enc/test_emoji_breaks.rb, for unknown reasons.
It turned out that the format of each of the emoji data/test files
is slightly different, and that we didn't tak...
duerst (Martin Dürst)
05:54 AM Bug #18080 (Open): Syntax error on one-line pattern matching
One line pattern matching with a method return value with parameters which are not surrounded by parenthesis raises syntax error.
I think it is not intentional, but nobu said it's hard to support because of parse.y limitation.
```r...
ko1 (Koichi Sasada)
05:43 AM Feature #12075: some container#nonempty?
What about `ary.filled?` ?
It nicely pairs with empty and is not too long.
It’s also a property of the container. And unlike `full?`, it doesn’t imply there is no more room.
p8 (Petrik de Heus)
02:31 AM Feature #12075: some container#nonempty?
I tend to like `ary.size > 0` more than `!ary.empty?` because the former literally has a "positive" nuance and therefore it's more readable in many cases. In that sense, the name `nonempty?` does not sound ideal to me.
So, I came up wi...
knu (Akinori MUSHA)
03:52 AM Bug #18079 (Closed): [PATCH] make error for MinGW with Clang/LLVM + LLD
```
building spec/ruby/optional/capi/ext/array_spec.so
lld-link: error: x64-ucrt-ruby310.dll: bad file type. Did you specify a DLL instead of an import library?
clang-13: error: linker command failed with exit code 1 (use -v to see in...
xtkoba (Tee KOBAYASHI)

08/16/2021

10:02 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
Ah, I can see there is missing the `read_abstract_origin` on the backtrace. vo.x (Vit Ondruch)
10:00 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
This is the GDB output:
~~~
(gdb) r
Starting program: /builddir/build/BUILD/ruby-3.0.2/miniruby -e Process.kill\ :SEGV,\ \$\$
Download failed: No route to host. Continuing without debug info for /lib64/libz.so.1.
Download failed:...
vo.x (Vit Ondruch)
07:46 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
Aren't there any subtle differences in GDB outputs? If fixed as intended, the value of `abstract_origin` can't get such large as 760312297580551 (0x2b380006a6807). xtkoba (Tee KOBAYASHI)
06:44 PM Bug #17052 (Open): Ruby with LTO enabled has issues with SIGSEGV handler
Thank you for looking into this.
Unfortunately, I have tried commit:git|72317b333b85eed483ad00bcd4f40944019a7c13 and I see no difference.
BTW I test Ruby 3.0.2 including the following commits:
1) commit:git|9e5105ca451d6d38eb2d0...
vo.x (Vit Ondruch)
08:30 PM Bug #18078 (Closed): rb_fix2uint should avoid method lookup and use FIXNUM_NEGATIVE_P
`rb_fix2uint` checks if the FIXNUM being converted overflows the `unsigned int` type. Previously this check was being done with `rb_num_negative_int_p`, which is equivalent to calling the `<` method on Integer (and checking whether it is... jhawthorn (John Hawthorn)
07:35 PM Misc #18039: DevelopersMeeting20210819Japan
* [Feature #18007] C extension "allocation function" check
* Should we add a config option and put in 3.1, or just wait for 3.2?
tenderlovemaking (Aaron Patterson)
12:40 PM Bug #18077: Marshal.dump(closed_io) raises IOError instead of TypeError
One concern for that [PR], probably may not be a matter, is closed `IO`s will no longer raise `IOError` on other `Encoding` operations too.
[PR]: https://github.com/ruby/ruby/pull/4746
```
$ ./ruby -v -e 'p Encoding.compatible?(Enco...
nobu (Nobuyoshi Nakada)
11:33 AM Bug #18077 (Closed): Marshal.dump(closed_io) raises IOError instead of TypeError
Marshal.dump is expected to raise a `TypeError` for unmarshallable objects. But closed streams raise an `IOError`:
```
$ ruby -e "io=IO.pipe.first; io.close; Marshal.dump(io)"
-e:1:in `internal_encoding': closed stream (IOError)
f...
larskanis (Lars Kanis)
10:35 AM Bug #17949: [SOLARIS11, SPARC, SEGFAULT] generating encdb.h
Just FTR, Clang/LLVM `__builtin_longjmp` is broken for Sparc targets: https://bugs.llvm.org/show_bug.cgi?id=51489 xtkoba (Tee KOBAYASHI)
08:42 AM Bug #18076 (Closed): ext/digest/md5/md5.c: `-Wnull-pointer-subtraction` warning by Clang 13
```
compiling ../../../../ext/digest/md5/md5.c
../../../../ext/digest/md5/md5.c:228:17: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]
if (!((data - (const uint8_t *...
xtkoba (Tee KOBAYASHI)
08:00 AM Revision a8714b83 (git): `popen()` is not available on emscripten
nobu (Nobuyoshi Nakada)
07:02 AM Revision 07b12a1f (git): Suppress unused-variable warnings
nobu (Nobuyoshi Nakada)
06:36 AM Revision ee7bd7d7 (git): `SIZE_MAX` is not `size_t` on emscripten
nobu (Nobuyoshi Nakada)
06:36 AM Revision 54199a3f (git): Use `VALUE` instead of `intptr_t`
On emscripten `intptr_t`, `uintptr_t`, `ptrdiff_t` and so on are
defined as `long`, but `PRIdPTR` and so on defined as `int`.
nobu (Nobuyoshi Nakada)
04:45 AM Revision 5087a6a9 (git): Fix COROUTINE_SRC on emscripten
Select the C source if exists, otherwise the assembler source,
instead of selecting by the coroutine type.
nobu (Nobuyoshi Nakada)
12:07 AM Revision 4cc44bd8 (git): * 2021-08-16 [ci skip]
git[bot]
12:06 AM Revision f8f6d989 (git): coroutine use asm version for handful of architectures for freebsd.
DC

08/15/2021

02:31 PM Revision 164f50de (git): Update TypeProf to 0.15.1
mame (Yusuke Endoh)
11:55 AM Misc #18039: DevelopersMeeting20210819Japan
* [Feature #16182] Should `expr in a, b, c` be allowed or not? (ktsj)
* How about allowing brackets/braces to be omitted in one-line pattern matching?
ktsj (Kazuki Tsujimoto)
11:53 AM Feature #16182: Should `expr in a, b, c` be allowed or not?
How about allowing brackets/braces to be omitted in one-line pattern matching?
Now that we use `=>` in one-line pattern matching, that syntax can't be made into an argument whether we allow omission or not.
ktsj (Kazuki Tsujimoto)
02:40 AM Bug #18075 (Closed): Crasher using ripper + yydebug
Applied in changeset commit:git|2aa6826e81ec880f5e98fa995e44fae0819be95d.
----------
Extract the wrapped value when yydebug [Bug #18075]
nobu (Nobuyoshi Nakada)
02:40 AM Revision 2aa6826e (git): Extract the wrapped value when yydebug [Bug #18075]
nobu (Nobuyoshi Nakada)
12:38 AM Revision 4568ba07 (git): Show verbose error messages when single pattern match fails
[0] => [0, *, a]
#=> [0] length mismatch (given 1, expected 2+) (NoMatchingPatternError)
Ignore test failures of typeprof caused by this change for now.
ktsj (Kazuki Tsujimoto)

08/14/2021

07:36 PM Bug #18000: have_library doesn't work when ruby is compiled with --disable-shared --disable-install-static-library
No objection from me to drop support for the `--disable-shared
--disable-install-static-library` config. I agree with Jean that it's an
improvement to give a clear message and fail fast.
> With that combination, shouldn't we drop the he...
alanwu (Alan Wu)
02:44 PM Bug #18000: have_library doesn't work when ruby is compiled with --disable-shared --disable-install-static-library
byroot (Jean Boussier) wrote in #note-6:
> But yeah I wish I could `--disable-shared` without having to ship a huge 100MiB+ static library, but since I don't quite understand what it would take to support this combination of flags, I ha...
nobu (Nobuyoshi Nakada)
12:27 AM Bug #18000: have_library doesn't work when ruby is compiled with --disable-shared --disable-install-static-library
> Not sure how byroot (Jean Boussier) or alanwu (Alan Wu) will feel about this approach, though.
At the very least I'd say it's progress as my attempt to ship ruby builds with this combinations of flags would have immediately failed d...
byroot (Jean Boussier)
04:04 PM Bug #17588 (Closed): Cannot build with library path with spaces on MSVC
Applied in changeset commit:git|147bdcc436c888a56f81e190d192cd9312015836.
----------
[Win32] put a space before configure options [Bug #17588]
Not to be concatenated with the preceding `--with-`* option.
nobu (Nobuyoshi Nakada)
04:01 PM Revision 147bdcc4 (git): [Win32] put a space before configure options [Bug #17588]
Not to be concatenated with the preceding `--with-`* option. nobu (Nobuyoshi Nakada)
03:27 PM Revision 717f0c56 (git): * 2021-08-15 [ci skip]
git[bot]
03:20 PM Revision 244fc65d (git): Disable checks for LTO [ci skip]
nobu (Nobuyoshi Nakada)
02:58 PM Bug #17052 (Closed): Ruby with LTO enabled has issues with SIGSEGV handler
Applied in changeset commit:git|72317b333b85eed483ad00bcd4f40944019a7c13.
----------
Ignore `DW_FORM_ref_addr` [Bug #17052]
Ignore `DW_FORM_ref_addr` form and other forms that are not supposed
to be used currently.
xtkoba (Tee KOBAYASHI)
02:57 PM Revision 72317b33 (git): Ignore `DW_FORM_ref_addr` [Bug #17052]
Ignore `DW_FORM_ref_addr` form and other forms that are not supposed
to be used currently.
xtkoba (Tee KOBAYASHI)
02:23 PM Revision 29dd7049 (git): Add checks for gcc/clang with LTO
nobu (Nobuyoshi Nakada)
02:22 PM Revision 2e49e433 (git): Disable debug flag for executable files when LTO [ci skip]
Get rid of tons of linker warnings that it could not find object
file symbol for every symbols, when targeting darwin.
nobu (Nobuyoshi Nakada)
02:12 PM Revision 97efd48f (git): Get rid of unintented recursion when RUBY_DEBUG
nobu (Nobuyoshi Nakada)
02:11 PM Revision 1bd021a7 (git): Mark internal class names
nobu (Nobuyoshi Nakada)
02:11 PM Revision 58d82eac (git): Add some "cold" marks
nobu (Nobuyoshi Nakada)
02:11 PM Revision edd27e12 (git): A comment for typed data in `rb_check_type` [ci skip]
nobu (Nobuyoshi Nakada)
02:11 PM Revision d58620e0 (git): Rename labels in `Check_Type` more descriptive
nobu (Nobuyoshi Nakada)
01:13 PM Revision 9f88135f (git): [ruby/readline-ext] Give up Editline
https://github.com/ruby/readline-ext/commit/d924cfc1e6 aycabta (aycabta .)
01:13 PM Revision 2c056816 (git): [ruby/reline] Add workspace member for the latest IRB's implementation
https://github.com/ruby/reline/commit/8b55fc8fee aycabta (aycabta .)
01:13 PM Revision a2f64937 (git): [ruby/reline] Remove private visibility
https://github.com/ruby/reline/commit/fa54e521da aycabta (aycabta .)
01:13 PM Revision acce754e (git): [ruby/reline] Remove interrupt avoidance
There used to be a process that did not want to be interrupted by
SIGINT, so it was trapped, but that process is no longer there.
https://github.com/ruby/reline/commit/ba7252a5db
aycabta (aycabta .)
01:09 PM Revision 1868b9fa (git): [Win32] Skip over source update just after clone on AppVeyor
nobu (Nobuyoshi Nakada)
09:35 AM Bug #16490: mkmf.rbの非互換な変更
本件は少なくともRuby 2.7.3辺りでは起きなくなっていますので、チケット自体はcloseしていただいても問題ないと考えています。
> dependファイルを直してコンパイルしてみてもエラーになりますので、
これは、コンパイラのオプションに-Werror付けている環境の問題と考えられます。
実際、-Werrorの付かない環境ではウォーニングを出すものの、正常にコンパイルは完了しています。
もちろん、ウォーニングを出さない様に修正すべきでしょうけれ...
taca (Takahiro Kambe)
12:54 AM Bug #16490 (Third Party's Issue): mkmf.rbの非互換な変更
`depend`ファイルを直してコンパイルしてみてもエラーになりますので、tmail gem自体をもっと修正する必要があると思います。
```
tmailscanner.c:105:11: error: implicit declaration of function 'rb_get_kcode' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
tmp = rb_get_kcode...
nobu (Nobuyoshi Nakada)
09:10 AM Bug #16836: configure-time LDFLAGS leak into ruby pkg-config file
Thanks for taking a look!
jeremyevans0 (Jeremy Evans) wrote in #note-1:
> According to the history, adding `DLDFLAGS` to `Libs` was a deliberate decision made back in 2010 in commit:51d25ca8c0eb7da192f5bdf2729fc856e8f81a9d. Assignin...
stapelberg (Michael Stapelberg)
08:10 AM Bug #18048: Thread#join can break with fiber scheduler unblock fails or blocks.
I will check it. ioquatix (Samuel Williams)
08:06 AM Bug #18048: Thread#join can break with fiber scheduler unblock fails or blocks.
I create the backport patch including 050a89543952a2c9e7c9bc938f4fdb538f6c9278 and 13f8521c630a15c87398dee0763e95f59c032a94 and push to my branch. See https://github.com/ruby/ruby/pull/4686/files.
But on the branch, make btest hangs o...
nagachika (Tomoyuki Chikanaga)
06:12 AM Feature #16428: Add Array#uniq?, Enumerable#uniq?
Recently I read similar topic again elsewhere. They pointed
* in most cases we have something to do on each duplicate element if any duplicate detected, e.g., reporting all duplicate elements as an error message
* `uniq?` looks slightly...
gotoken (Kentaro Goto)
04:20 AM Bug #18075 (Closed): Crasher using ripper + yydebug
`method `inspect' called on unexpected T_NODE object` via the following with `-d` (see output at end):
```
#!/usr/bin/env ruby -wvs
$d ||= false
require "ripper/sexp"
src = "'woot'"
rip = Ripper::SexpBuilderPP.new src
ri...
zenspider (Ryan Davis)
02:34 AM Revision a9977ba2 (git): Constified addr2line.c
nobu (Nobuyoshi Nakada)

08/13/2021

09:09 PM Bug #16448 (Closed): regex global variables are working differently depending on scope
jeremyevans0 (Jeremy Evans)
09:05 PM Bug #16490: mkmf.rbの非互換な変更
Reverting the line removed from mkmf.rb in r67033 (commit:3d1c86a26f0c96a9c1d0247b968aa96e6f3c30bb) allows for the tmail gem to install on the master branch. I've submitted a pull request for that: https://github.com/ruby/ruby/pull/4738 jeremyevans0 (Jeremy Evans)
08:25 PM Bug #16836 (Assigned): configure-time LDFLAGS leak into ruby pkg-config file
According to the history, adding `DLDFLAGS` to `Libs` was a deliberate decision made back in 2010 in commit:51d25ca8c0eb7da192f5bdf2729fc856e8f81a9d. Assigning to @nobu as he was the one that made the change. I'm guessing there are env... jeremyevans0 (Jeremy Evans)
08:13 PM Bug #17349: Rake での並行実行における正規表現マッチングの異常
I reviewed the mruby `presym.rake` file and was able to come up with a self contained reproducible example, which I have attached. I confirmed the issue is still present in Ruby 3.0 (this error shows the issue happened between 600 and 1... jeremyevans0 (Jeremy Evans)
06:22 PM Bug #18000: have_library doesn't work when ruby is compiled with --disable-shared --disable-install-static-library
nobu (Nobuyoshi Nakada) wrote in #note-4:
> We should disallow that combination, I think.
> ...
Here's a pull request to disallow the combination of `--disable-shared --disable-install-static-library`: https://github.com/ruby/ruby/pull...
jeremyevans0 (Jeremy Evans)
02:42 AM Bug #18000: have_library doesn't work when ruby is compiled with --disable-shared --disable-install-static-library
We should disallow that combination, I think.
Otherwise, should drop also the headers.
nobu (Nobuyoshi Nakada)
05:26 PM Revision 963f2e01 (git): Reduce the amount of false positive notifications
k0kubun (Takashi Kokubun)
04:15 PM Revision e57a1cc2 (git): ruby/spec no longer needs webrick to run
Eregon (Benoit Daloze)
04:13 PM Revision ee362302 (git): Revert "Pause an MJIT worker when JIT is cancelled"
This reverts commit b64f81c81729bbc248d19af01cafde88eb60fdc7.
It seems to cause a problem in --jit / --jit-wait CIs. Reverting for now.
k0kubun (Takashi Kokubun)
04:10 PM Revision 15c9c784 (git): * 2021-08-14 [ci skip]
git[bot]
04:09 PM Revision 73085c8d (git): Update to ruby/spec@330c641
Eregon (Benoit Daloze)
02:24 PM Bug #17588: Cannot build with library path with spaces on MSVC
I think there's an issue somewhere in the configuration for msvc, missing a space between two conf args it seems.
# Try 1
```
..\ruby\win32\configure.bat --disable-install-doc --enable-bundled-libffi --with-opt-dir=C:/Users/julien/Sof...
jmarrec (Julien Marrec)
01:29 PM Bug #17588: Cannot build with library path with spaces on MSVC
I'll try again, I'll report back. I see how your change could have fixed the enc/lib specifically indeed. jmarrec (Julien Marrec)
01:04 PM Bug #17588: Cannot build with library path with spaces on MSVC
I tried today with master (ac4d53bd461ff386cd45fdd484ffb6b628a251ad). So it isn't fixed by https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/8a5e161cd9a251054e851d46ccc367609a31c1c7 jmarrec (Julien Marrec)
10:32 AM Bug #17588: Cannot build with library path with spaces on MSVC
jmarrec (Julien Marrec) wrote in #note-4:
> My first thing is I've noticed that if I strap --with-static-linked-ext to the configure options, then no matter what I try, I always have to build ruby twice. There's a dependency issue somew...
xtkoba (Tee KOBAYASHI)
10:15 AM Bug #17588: Cannot build with library path with spaces on MSVC
I am revisiting this with the latest master today.
My command has quotes, and I am not changing the `--with-openssl-dir="C:/Program Files/OpenSSL-Win64"` which works plenty fine without `--static-linked-ext`
https://github.com/jmar...
jmarrec (Julien Marrec)
01:45 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
It turns out that `DW_FORM_ref_addr` is not interpreted correctly. A patch is attached to just ignore that form (and other forms that are not supposed to be used currently in `addr2line.c`). This ignorance does not seem to affect the qua... xtkoba (Tee KOBAYASHI)
11:14 AM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
Now I can reproduce this on my qemu-user-emulated powerpc64le-linux-musl environment:
```
$ powerpc64le-musl-qemu -strace ./miniruby -e 'Process.kill :SEGV, $$'
(...)
24209 readlink("/proc/self/exe",0x0000004000490bd8,4096) = 75
2...
xtkoba (Tee KOBAYASHI)
06:35 AM Feature #17881 (Feedback): Add a Module#const_added callback
FYI, I changed the MJIT implementation in commit:ac4d53bd461ff386cd45fdd484ffb6b628a251ad to not disable JIT-ed code when a TracePoint for class events gets enabled. So, as long as Zeitwerk only uses TracePoints for class events, we no l... k0kubun (Takashi Kokubun)
06:26 AM Revision ac4d53bd (git): Don't cancel JIT-ed code on TracePoint :class
events get enabled k0kubun (Takashi Kokubun)
06:19 AM Revision 365da4c6 (git): Don't run mjit_cancel_all when MJIT is disabled
k0kubun (Takashi Kokubun)
06:15 AM Revision b64f81c8 (git): Pause an MJIT worker when JIT is cancelled
k0kubun (Takashi Kokubun)
06:11 AM Revision b3f8c491 (git): Print JIT cancel when all JIT-ed code is cancelled
k0kubun (Takashi Kokubun)
05:52 AM Bug #18062 (Closed): Ruby with enabled LTO segfaults during build
Applied in changeset commit:git|573eef7c897ff938539270e605445da13093d664.
----------
Indicate the slow path of `Check_Type` never return [Bug #18062]
Though this call to `rb_check_type` is just to raise an exception
and never return ac...
nobu (Nobuyoshi Nakada)
05:51 AM Revision 1a169402 (git): * 2021-08-13 [ci skip]
git[bot]
04:29 AM Revision 611da9fa (git): Mark `rb_unexpected_type` as "cold" [Bug #18062]
So that it will not interfere the fast path in `Check_Type`. nobu (Nobuyoshi Nakada)
04:29 AM Revision 573eef7c (git): Indicate the slow path of `Check_Type` never return [Bug #18062]
Though this call to `rb_check_type` is just to raise an exception
and never return actually, it can return at least formally. That
means a caller function looks like it will access `flags` even in
the special-const cases, and some optim...
nobu (Nobuyoshi Nakada)

08/12/2021

10:04 PM Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
I noticed that `addr2line.c` misinterpreted the size of `DW_FORM_ref_addr` as the size of an address. In fact it should be interpreted as the size of an offset (32 bits in 32-bit DWARF and 64 bits in 64-bit DWARF) [1]. A patch is attache... xtkoba (Tee KOBAYASHI)
03:59 PM Bug #17052 (Open): Ruby with LTO enabled has issues with SIGSEGV handler
Changing state back to open, because this is unresolved and I am repeatedly hitting this issue in various reincarnations. So this is the debug session on PPC64LE:
~~~
$ gdb --args ./miniruby -e'Process.kill("SIGSEGV",$$)'
GNU gdb (G...
vo.x (Vit Ondruch)
06:35 PM Bug #18000: have_library doesn't work when ruby is compiled with --disable-shared --disable-install-static-library
While it is possible to compile with only the headers, that only works if you know what the headers should contain. If you aren't sure what the headers contain, and you have to test, you really need to test both compiling and linking to... jeremyevans0 (Jeremy Evans)
06:16 PM Bug #18073: test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5
jaruga (Jun Aruga) wrote in #note-4:
> I executed `git bisect` between `v2_7_3` and `v2_7_4`. And I found the following commit causes these test failures.
> ...
As a temporary workaround to build Ruby 2.7.4 on RHEL7, I am applying a pa...
jaruga (Jun Aruga)
08:49 AM Bug #18073: test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5
@xtkoba thanks for the info. I confirmed the value of `CPP` on RHEL 7 autoconf version 2.69.
The following `configure.ac` works fine.
```
$ cat configure.ac
AC_INIT
ac_cv_prog_cc_c99=-std=gnu99
AC_PROG_CC_C99
AC_PREPROC_IFELS...
jaruga (Jun Aruga)
03:47 PM Bug #18062: Ruby with enabled LTO segfaults during build
The problem described in #note-24 does not look like very much related to the other part. Maybe worth reopening #17052? xtkoba (Tee KOBAYASHI)
03:19 PM Bug #18062: Ruby with enabled LTO segfaults during build
Just testing the issue from [comment 24](https://bugs.ruby-lang.org/issues/18062#note-24) and there is not difference with or without `-fno-strict-aliasing` vo.x (Vit Ondruch)
12:37 PM Bug #18062: Ruby with enabled LTO segfaults during build
I was able to reduce the `Hash.ruby2_keywords_hash?(1)` repro and report it to GCC.
It looks like we are hitting an optimizer bug with LTO: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101868
For workarounds, putting `__attribute__ (...
alanwu (Alan Wu)
09:42 AM Bug #18062: Ruby with enabled LTO segfaults during build
vo.x (Vit Ondruch) wrote in #note-26:
> BTW, In your experience, do you think trying something like [1] could help catch such issues earlier?
I'm sorry but I'm not familiar with techniques for detecting strict aliasing violation. It ...
xtkoba (Tee KOBAYASHI)
08:18 AM Bug #18062: Ruby with enabled LTO segfaults during build
xtkoba (Tee KOBAYASHI) wrote in #note-25:
> I would humbly advise that the `-fno-strict-aliasing` flag be appended to `CFLAGS` by default. See also #17540.
I have not find any guidelines about/against `-fno-strict-aliasing` in Fedora...
vo.x (Vit Ondruch)
01:31 PM Bug #17806: Bad interaction between method cache, prepend, and refinements
Thanks @alanwu!
I forgot to watch this issue so I was never notified of your response. Sorry for the delay.
> I would try running these two lines before requiring the test file that contains the | call:
> ...
Thank you so much -- ...
mk (Matthias Käppler)
10:55 AM Revision 5534698b (git): [ruby/reline] Version 0.2.7
https://github.com/ruby/reline/commit/040d29b4c0 aycabta (aycabta .)
10:53 AM Revision f9abcfb6 (git): [ruby/irb] Version 1.3.7
https://github.com/ruby/irb/commit/98610236ec aycabta (aycabta .)
10:53 AM Revision 53743a42 (git): [ruby/irb] Update dependency, reline >= 0.2.7
https://github.com/ruby/irb/commit/5a0c8dc9e6 aycabta (aycabta .)
10:47 AM Revision 5196b171 (git): Revert "Try to run test_interrupt_in_other_thread with Editline"
This reverts commit c66b27efbb27c6b6b410457282ac841ead1dd132. aycabta (aycabta .)
06:35 AM Revision c66b27ef (git): Try to run test_interrupt_in_other_thread with Editline
aycabta (aycabta .)
04:46 AM Revision 7ac44091 (git): Separate jobs conditions
nobu (Nobuyoshi Nakada)
02:29 AM Revision 1cdc7510 (git): RBIMPL_ATTR_DEPRECATED: enable for GCC 10.3+
They fixed the bug. shyouhei (Shyouhei Urabe)
 

Also available in: Atom