ml.ruby-lang.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

ruby-core

Thread Start a new thread
Download
Threads by month
  • ----- 2025 -----
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
ruby-core@ml.ruby-lang.org

July 2023

  • 1 participants
  • 170 discussions
[ruby-core:114202] [Ruby master Bug#19084] Using `IO::Buffer` to change an extended String affects other Strings sharing the same buffer
by nagachika (Tomoyuki Chikanaga) 16 Jul '23

16 Jul '23
Issue #19084 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: REQUIRED, 3.2: REQUIRED to 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: REQUIRED, 3.2: DONE ruby_3_2 c911cbd6c3dcc80def61ab48be1815cd910fc91b merged revision(s) bd786e78969f9d4a8699376ceafe10934b6ad533. ---------------------------------------- Bug #19084: Using `IO::Buffer` to change an extended String affects other Strings sharing the same buffer https://bugs.ruby-lang.org/issues/19084#change-103889 * Author: jemmai (Jemma Issroff) * Status: Closed * Priority: Normal * ruby -v: master * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: REQUIRED, 3.2: DONE ---------------------------------------- When two extended Strings share a buffer, and one String's buffer changes, it currently affects the other String's buffer. Here is a snippet to demonstrate this: ``` string = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" other_string = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" IO::Buffer.for(string) do |buffer| buffer.set_value(:U8, 0, "*".ord) end other_string[0] == "a" # => false ``` [Here is a PR which adds the above example as a test](https://github.com/ruby/ruby/pull/6630), and is currently failing CI. (cc @ioquatix) -- https://bugs.ruby-lang.org/
1 0
0 0
[ruby-core:113005] [Ruby master Bug#19546] IO::Buffer is incorrectly invoking fiber scheduler interface.
by ioquatix (Samuel Williams) 16 Jul '23

16 Jul '23
Issue #19546 has been reported by ioquatix (Samuel Williams). ---------------------------------------- Bug #19546: IO::Buffer is incorrectly invoking fiber scheduler interface. https://bugs.ruby-lang.org/issues/19546 * Author: ioquatix (Samuel Williams) * Status: Open * Priority: Normal * Assignee: ioquatix (Samuel Williams) * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- The `IO::Buffer` implementation incorrectly calls rb_fiber_scheduler_io_write with the size_ts converted to VALUEs: https://github.com/ruby/ruby/blob/400ccb16eefe4e21c4e3eacab4fd0f208fc5e151/… But that function expects size_ts: https://github.com/ruby/ruby/blob/400ccb16eefe4e21c4e3eacab4fd0f208fc5e151/… (And probably the same for the other scheduler methods.) Fixed by <https://github.com/ruby/ruby/pull/7593>. -- https://bugs.ruby-lang.org/
2 2
0 0
[ruby-core:112721] [Ruby master Bug#19482] Fix crash when allocating classes with newobj hook
by peterzhu2118 (Peter Zhu) 15 Jul '23

15 Jul '23
Issue #19482 has been reported by peterzhu2118 (Peter Zhu). ---------------------------------------- Bug #19482: Fix crash when allocating classes with newobj hook https://bugs.ruby-lang.org/issues/19482 * Author: peterzhu2118 (Peter Zhu) * Status: Open * Priority: Normal * Backport: 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONTNEED, 3.2: REQUIRED ---------------------------------------- GitHub PR: https://github.com/ruby/ruby/pull/7464 We need to zero out the whole slot when running the newobj hook for a newly allocated class because the slot could be filled with garbage, which would cause a crash if a GC runs inside of the newobj hook. For example, the following script crashes: ```ruby require "objspace" GC.stress = true ObjectSpace.trace_object_allocations { 100.times do Class.new end } ``` -- https://bugs.ruby-lang.org/
2 1
0 0
[ruby-core:112723] [Ruby master Bug#19483] rubyzip not behaving well with YJIT
by k0kubun (Takashi Kokubun) 15 Jul '23

15 Jul '23
Issue #19483 has been reported by k0kubun (Takashi Kokubun). ---------------------------------------- Bug #19483: rubyzip not behaving well with YJIT https://bugs.ruby-lang.org/issues/19483 * Author: k0kubun (Takashi Kokubun) * Status: Open * Priority: Normal * Assignee: yjit * Backport: 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONTNEED, 3.2: REQUIRED ---------------------------------------- Copied from https://github.com/Shopify/yjit/issues/310 for backports. -- https://bugs.ruby-lang.org/
2 1
0 0
[ruby-core:112578] [Ruby master Bug#19463] YJIT `[BUG] Stack consistency error` under certain invalidation scenarios
by alanwu (Alan Wu) 15 Jul '23

15 Jul '23
Issue #19463 has been reported by alanwu (Alan Wu). ---------------------------------------- Bug #19463: YJIT `[BUG] Stack consistency error` under certain invalidation scenarios https://bugs.ruby-lang.org/issues/19463 * Author: alanwu (Alan Wu) * Status: Open * Priority: Normal * ruby -v: ruby 3.2.1 (2023-02-08 revision 31819e82c8) +YJIT [arm64-darwin22] * Backport: 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONTNEED, 3.2: REQUIRED ---------------------------------------- > test.rb:19: [BUG] Stack consistency error (sp: 15, bp: 16) With the following: ```ruby klass = Class.new do def self.lookup(hash, key) = hash[key] def self.foo(a, b) = [] def self.test(hash, key) [lookup(hash, key), key, "".freeze] # 05 opt_send_without_block :lookup # 07 getlocal_WC_0 :hash # 09 opt_str_freeze "" # 12 newarray 3 # 14 leave # # YJIT will put instructions (07..14) into a block. # When String#freeze is redefined from within lookup(), # the return address to the block is still on-stack. We rely # on invalidation patching the code at the return address # to service this situation correctly. end end # get YJIT to compile test() hash = { 1 => [] } 31.times { klass.test(hash, 1) } # inject invalidation into lookup() evil_hash = Hash.new do |_, key| class String undef :freeze def freeze = :ugokanai end key end p klass.test(evil_hash, 1) ``` The fix is fairly simple and I'll apply it shortly. -- https://bugs.ruby-lang.org/
2 1
0 0
[ruby-core:113779] [Ruby master Feature#19714] Add Refinement#refined_module
by shugo (Shugo Maeda) 14 Jul '23

14 Jul '23
Issue #19714 has been reported by shugo (Shugo Maeda). ---------------------------------------- Feature #19714: Add Refinement#refined_module https://bugs.ruby-lang.org/issues/19714 * Author: shugo (Shugo Maeda) * Status: Assigned * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) * Target version: 3.3 ---------------------------------------- Eregon (Benoit Daloze) wrote in https://bugs.ruby-lang.org/issues/12737#note-15: > `Refinement#refined_class` is a bit strange given it can return a module. > How about adding `Refinement#refined_module` as an alias for clarity? I'm for it. What do you think, Matz? -- https://bugs.ruby-lang.org/
4 6
0 0
[ruby-core:114193] [Ruby master Bug#19769] Range of size 1 in String#tr causes unexpected behavior
by alexandre (alexandre borderes) 14 Jul '23

14 Jul '23
Issue #19769 has been reported by alexandre (alexandre borderes). ---------------------------------------- Bug #19769: Range of size 1 in String#tr causes unexpected behavior https://bugs.ruby-lang.org/issues/19769 * Author: alexandre (alexandre borderes) * Status: Open * Priority: Normal * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- Hi, I noticed a possible unexpected behavior in String#tr. Is that intentional? ``` ruby 'ABC'.tr 'A-AB', 'XY' # => "YYC" ``` I would expect the same result as: ``` ruby 'ABC'.tr 'AB', 'XY' # => "XYC" ``` The tr utility does exactly that: ``` shell echo ABC | tr A-AB XY # => "XYC" ``` The letter 'A' is interpreted 2 times in that case, shifting by 1 all the replacement string. -- https://bugs.ruby-lang.org/
1 1
0 0
[ruby-core:114186] [Ruby master Bug#19768] Building ruby with YJIT enabled on Ubuntu and then building ruby with YJIT disabled fails
by jinroq (Jinroq SAITOH) 14 Jul '23

14 Jul '23
Issue #19768 has been reported by jinroq (Jinroq SAITOH). ---------------------------------------- Bug #19768: Building ruby with YJIT enabled on Ubuntu and then building ruby with YJIT disabled fails https://bugs.ruby-lang.org/issues/19768 * Author: jinroq (Jinroq SAITOH) * Status: Open * Priority: Normal * ruby -v: 3.3.0-dev * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- On Ubuntu 22.04.2 LTS, after building according to the [Building YJIT](https://docs.ruby-lang.org/en/master/yjit/yjit_md.html#label-Building… documentation, it fails when building according to part of the [Quick start guide](https://docs.ruby-lang.org/en/master/contributing/building_ruby_md.h… documentation. Is this as expected? ## Case 1. ``` $ git clone https://github.com/ruby/ruby.git yjit $ cd yjit $ ./autogen.sh $ ./configure --enable-yjit --prefix=$HOME/.rubies/ruby-yjit --disable-install-doc $ make -j install # => Success $ mkdir build && cd build $ ../configure --prefix="${HOME}/.rubies/ruby-master" $ make install # => Failure BASERUBY = /home/jinroq/.rbenv/shims/ruby --disable=gems CC = gcc LD = ld LDSHARED = gcc -shared CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef XCFLAGS = -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -I. -I.ext/include/x86_64-linux -I../include -I.. -I../enc/unicode/15.0.0 CPPFLAGS = DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie SOLIBS = -lz -lrt -lrt -lgmp -ldl -lcrypt -lm -lpthread LANG = ja_JP.UTF-8 LC_ALL = LC_CTYPE = MFLAGS = RUSTC = rustc YJIT_RUSTC_ARGS = --crate-name=yjit --crate-type=staticlib --edition=2021 -g -C lto=thin -C opt-level=3 -C overflow-checks=on '--out-dir=/home/jinroq/dev/investigate/yjit/build/yjit/target/release/' ../yjit/src/lib.rs gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. compiling ../main.c compiling ../dmydln.c compiling ../miniinit.c compiling ../array.c compiling ../ast.c compiling ../bignum.c compiling ../class.c compiling ../compar.c compiling ../compile.c compiling ../complex.c compiling ../cont.c compiling ../debug.c compiling ../debug_counter.c compiling ../dir.c compiling ../dln_find.c compiling ../encoding.c compiling ../enum.c compiling ../enumerator.c compiling ../error.c compiling ../eval.c compiling ../file.c compiling ../gc.c compiling ../hash.c compiling ../inits.c compiling ../io.c compiling ../io_buffer.c compiling ../iseq.c compiling ../load.c compiling ../marshal.c compiling ../math.c compiling ../memory_view.c compiling ../rjit.c compiling ../rjit_c.c compiling ../node.c compiling ../node_dump.c compiling ../numeric.c compiling ../object.c compiling ../pack.c compiling ../parse.c compiling ../parser_st.c compiling ../proc.c compiling ../process.c compiling ../ractor.c compiling ../random.c compiling ../range.c compiling ../rational.c compiling ../re.c compiling ../regcomp.c compiling ../regenc.c compiling ../regerror.c compiling ../regexec.c compiling ../regparse.c compiling ../regsyntax.c compiling ../ruby.c compiling ../ruby_parser.c compiling ../scheduler.c compiling ../shape.c compiling ../signal.c compiling ../sprintf.c compiling ../st.c compiling ../strftime.c compiling ../string.c compiling ../struct.c compiling ../symbol.c compiling ../thread.c compiling ../time.c compiling ../transcode.c compiling ../util.c compiling ../variable.c compiling ../version.c compiling ../vm.c compiling ../vm_backtrace.c compiling ../vm_dump.c compiling ../vm_sync.c compiling ../vm_trace.c compiling ../weakmap.c compiling ../yarp/api_node.c compiling ../yarp/api_pack.c compiling ../yarp/diagnostic.c compiling ../yarp/enc/yp_ascii.c compiling ../yarp/enc/yp_big5.c compiling ../yarp/enc/yp_euc_jp.c compiling ../yarp/enc/yp_gbk.c compiling ../yarp/enc/yp_iso_8859_1.c compiling ../yarp/enc/yp_iso_8859_10.c compiling ../yarp/enc/yp_iso_8859_11.c compiling ../yarp/enc/yp_iso_8859_13.c compiling ../yarp/enc/yp_iso_8859_14.c compiling ../yarp/enc/yp_iso_8859_15.c compiling ../yarp/enc/yp_iso_8859_16.c compiling ../yarp/enc/yp_iso_8859_2.c compiling ../yarp/enc/yp_iso_8859_3.c compiling ../yarp/enc/yp_iso_8859_4.c compiling ../yarp/enc/yp_iso_8859_5.c compiling ../yarp/enc/yp_iso_8859_6.c compiling ../yarp/enc/yp_iso_8859_7.c compiling ../yarp/enc/yp_iso_8859_8.c compiling ../yarp/enc/yp_iso_8859_9.c compiling ../yarp/enc/yp_koi8_r.c compiling ../yarp/enc/yp_shared.c compiling ../yarp/enc/yp_shift_jis.c compiling ../yarp/enc/yp_unicode.c compiling ../yarp/enc/yp_windows_1251.c compiling ../yarp/enc/yp_windows_1252.c compiling ../yarp/enc/yp_windows_31j.c compiling ../yarp/node.c compiling ../yarp/pack.c compiling ../yarp/prettyprint.c compiling ../yarp/regexp.c compiling ../yarp/serialize.c compiling ../yarp/token_type.c compiling ../yarp/unescape.c compiling ../yarp/util/yp_buffer.c compiling ../yarp/util/yp_char.c compiling ../yarp/util/yp_constant_pool.c compiling ../yarp/util/yp_list.c compiling ../yarp/util/yp_memchr.c compiling ../yarp/util/yp_newline_list.c compiling ../yarp/util/yp_snprintf.c compiling ../yarp/util/yp_state_stack.c compiling ../yarp/util/yp_string.c compiling ../yarp/util/yp_string_list.c compiling ../yarp/util/yp_strncasecmp.c compiling ../yarp/util/yp_strpbrk.c compiling ../yarp/yarp.c compiling ../yarp/yarp_init.c compiling ../yarp/extension.c compiling ../yjit.c partial linking yjit/target/release/libyjit.a into yjit/target/release/libyjit.o ld: cannot open output file yjit/target/release/libyjit.o: そのようなファイルやディレクトリはありません make: *** [../yjit/yjit.mk:49: yjit/target/release/libyjit.o] エラー 1 ``` ## Case 2. ``` $ git clone https://github.com/ruby/ruby.git $ cd ruby/ && ./autogen.sh $ mkdir build && cd build $ ../configure --prefix="${HOME}/.rubies/ruby-master" $ make install # => Success $ make clean $ cd ../ $ ./configure --enable-yjit --prefix=$HOME/.rubies/ruby-yjit --disable-install-doc $ make -j install # => Success $ cd build $ ../configure --prefix="${HOME}/.rubies/ruby-master" $ make install # => Failure BASERUBY = /home/jinroq/.rbenv/shims/ruby --disable=gems CC = gcc LD = ld LDSHARED = gcc -shared CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef XCFLAGS = -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -I. -I.ext/include/x86_64-linux -I../include -I.. -I../enc/unicode/15.0.0 CPPFLAGS = DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie SOLIBS = -lz -lrt -lrt -lgmp -ldl -lcrypt -lm -lpthread LANG = ja_JP.UTF-8 LC_ALL = LC_CTYPE = MFLAGS = RUSTC = rustc YJIT_RUSTC_ARGS = --crate-name=yjit --crate-type=staticlib --edition=2021 -g -C lto=thin -C opt-level=3 -C overflow-checks=on '--out-dir=/home/jinroq/dev/investigate/ruby/build/yjit/target/release/' ../yjit/src/lib.rs gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. linking miniruby /usr/bin/ld: main.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: dmydln.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: miniinit.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: dmyext.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: array.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: ast.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: bignum.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: class.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: compar.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: compile.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: complex.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: cont.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: debug.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: debug_counter.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: dir.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: dln_find.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: encoding.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: enum.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: enumerator.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: error.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: eval.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: file.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: gc.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: hash.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: inits.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: io.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: io_buffer.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: iseq.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: load.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: marshal.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: math.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: memory_view.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: rjit.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: rjit_c.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: node.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: node_dump.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: numeric.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: object.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: pack.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: parse.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: parser_st.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: proc.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: process.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: ractor.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: random.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: range.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: rational.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: re.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: regcomp.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: regenc.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: regerror.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: regexec.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: regparse.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: regsyntax.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: ruby.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: ruby_parser.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: scheduler.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: shape.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: signal.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: sprintf.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: st.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: strftime.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: string.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: struct.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: symbol.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: thread.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: time.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: transcode.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: util.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: variable.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: version.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: vm.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: vm_backtrace.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: vm_dump.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: vm_sync.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: vm_trace.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: weakmap.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/api_node.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/api_pack.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/diagnostic.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_ascii.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_big5.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_euc_jp.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_gbk.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_iso_8859_1.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_iso_8859_10.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_iso_8859_11.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_iso_8859_13.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_iso_8859_14.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_iso_8859_15.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_iso_8859_16.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_iso_8859_2.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_iso_8859_3.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_iso_8859_4.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_iso_8859_5.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_iso_8859_6.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_iso_8859_7.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_iso_8859_8.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_iso_8859_9.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_koi8_r.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_shared.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_shift_jis.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_unicode.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_windows_1251.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_windows_1252.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/enc/yp_windows_31j.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/node.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/pack.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/prettyprint.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/regexp.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/serialize.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/token_type.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/unescape.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/util/yp_buffer.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/util/yp_char.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/util/yp_constant_pool.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/util/yp_list.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/util/yp_memchr.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/util/yp_newline_list.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/util/yp_snprintf.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/util/yp_state_stack.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/util/yp_string.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/util/yp_string_list.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/util/yp_strncasecmp.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/util/yp_strpbrk.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/yarp.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/yarp_init.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yarp/extension.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yjit.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: yjit/target/release/libyjit.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: coroutine/amd64/Context.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: enc/ascii.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: enc/us_ascii.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: enc/unicode.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: enc/utf_8.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: enc/trans/newline.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: setproctitle.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: strlcat.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: strlcpy.o が見つかりません: そのようなファイルやディレクトリはありません /usr/bin/ld: addr2line.o が見つかりません: そのようなファイルやディレクトリはありません collect2: error: ld returned 1 exit status make: *** [Makefile:298: miniruby] エラー 1 ``` ### Cases that do not fail ``` $ git clone https://github.com/ruby/ruby.git $ cd ruby/ $ ./autogen.sh $ mkdir build && cd build $ ../configure --prefix="${HOME}/.rubies/ruby-master" $ make install # => Success $ make clean $ ../configure --enable-yjit --prefix=$HOME/.rubies/ruby-yjit --disable-install-doc $ make -j install # => Success $ ../configure --prefix="${HOME}/.rubies/ruby-master" $ make install # => Success ``` -- https://bugs.ruby-lang.org/
3 3
0 0
[ruby-core:113888] [Ruby master Bug#19726] Script loadde twice when requiring self
by johannes (Johannes Krude) 14 Jul '23

14 Jul '23
Issue #19726 has been reported by johannes (Johannes Krude). ---------------------------------------- Bug #19726: Script loadde twice when requiring self https://bugs.ruby-lang.org/issues/19726 * Author: johannes (Johannes Krude) * Status: Open * Priority: Normal * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- The executed program is not added to `$LOADED_FEATURES` unexpectedly resulting in the program possibly being loaded twice: a.rb: ``` #!/usr/bin/env ruby require "./b" C = 42 return unless __FILE__ == $0 puts C ``` b.rb: ``` require "./a" ``` This results in: ``` $ ./a.rb ./a.rb:5: warning: already initialized constant C /home/johannes/t/a.rb:5: warning: previous definition of C was here 42 ``` Ruby version: ``` $ sudo docker run ruby:3.3.0-preview1 ruby --version ruby 3.3.0preview1 (2023-05-12 master a1b01e7701) [x86_64-linux] ``` **This could be solved by always adding the executed program to `$LOADED_FEATURES`.** As a workaround, executed programs can be prepended with: ``` require "pathname" if __FILE__ == $0 $LOADED_FEATURES << Pathname.new(__FILE__).expand_path.to_s end ``` -- https://bugs.ruby-lang.org/
5 5
0 0
[ruby-core:114185] [Ruby master Bug#18743] Enumerator#next / peek re-use each others stacktraces
by marcper (Marcelo Pereira) 14 Jul '23

14 Jul '23
Issue #18743 has been updated by marcper (Marcelo Pereira). Hello again, @ko1. Please let me know if this patch is acceptable. I followed the suggestions from @nobu already. Best ---------------------------------------- Bug #18743: Enumerator#next / peek re-use each others stacktraces https://bugs.ruby-lang.org/issues/18743#change-103872 * Author: sos4nt (Stefan Schüßler) * Status: Open * Priority: Normal * Assignee: ko1 (Koichi Sasada) * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- I encountered an odd behavior. If I rescue the `StopIteration` exception from `peek` and call `next` afterwards: (or vice-versa) ```ruby # enum.rb # 1 # 2 enum = [].each # 3 enum.peek rescue nil # 4 enum.next # 5 ``` it will show the stacktrace from the rescued `peek` call: ``` $ ruby enum.rb enum.rb:4:in `peek': iteration reached an end (StopIteration) from enum.rb:4:in `<main>' ``` Whereas the error should refer to `next` on line number 5. The same happens when calling `peek` after `next` or when having muliple `peek` / `next` calls: ```ruby # enum.rb # 1 # 2 enum = [].each # 3 enum.peek rescue nil # 4 enum.next rescue nil # 5 enum.peek rescue nil # 6 puts "line #{__LINE__}" # 7 enum.next # 8 ``` The stacktrace from the first (rescued) `peek` or `next` call will be shown which doesn't reflect the actual error location: ``` $ ruby enum.rb line 7 enum.rb:4:in `peek': iteration reached an end (StopIteration) from enum.rb:4:in `<main>' ``` This is very confusing when debugging code. ---Files-------------------------------- 01-Recreate-stacktrace-enumerator.patch (1.29 KB) -- https://bugs.ruby-lang.org/
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.