NetBSD Problem Report #59017
From www@netbsd.org Tue Jan 21 10:05:37 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 05FB81A923A
for <gnats-bugs@gnats.NetBSD.org>; Tue, 21 Jan 2025 10:05:37 +0000 (UTC)
Message-Id: <20250121100535.712741A923B@mollari.NetBSD.org>
Date: Tue, 21 Jan 2025 10:05:35 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: ruby32 crashes in asciidoctor
X-Send-Pr-Version: www-1.0
>Number: 59017
>Category: pkg
>Synopsis: ruby32 crashes in asciidoctor
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: taca
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 21 10:10:00 +0000 2025
>Last-Modified: Wed Oct 01 12:15:00 +0000 2025
>Originator: Taylor R Campbell
>Release: netbsd-9 userland on netbsd-10 kernel, pkgsrc-current, ruby32-base-3.2.5
>Organization:
The NetBSigaltstackD Gemdation
>Environment:
>Description:
While trying to build a package that uses asciidoctor, ruby crashes with SIGSEGV:
asciidoctor --require=./doc/man.rb --backend=manpage doc/manpage-newsboat.asciidoc
/home/riastradh/pkgsrc/git/cross/pkg/lib/ruby/3.2.0/x86_64-netbsd/rbconfig.rb: [BUG] Segmentation fault
ruby 3.2.6 (2024-10-30 revision 63aeb018eb) [x86_64-netbsd]
-- Control frame information -----------------------------------------------
c:0006 p:---- s:0027 e:000026 DUMMY [FINISH]
c:0005 p:---- s:0024 e:000023 CFUNC :require
c:0004 p:0005 s:0019 e:000018 TOP /home/riastradh/pkgsrc/git/cross/pkg/lib/ruby/3.2.0/rubygems.rb:9 [FINISH]
c:0003 p:---- s:0012 e:000011 CFUNC :require
c:0002 p:0012 s:0007 e:000006 TOP <internal:gem_prelude>:2 [FINISH]
c:0001 p:0000 s:0003 E:000a40 DUMMY [FINISH]
-- Ruby level backtrace information ----------------------------------------
<internal:gem_prelude>:2:in `<internal:gem_prelude>'
<internal:gem_prelude>:2:in `require'
/home/riastradh/pkgsrc/git/cross/pkg/lib/ruby/3.2.0/rubygems.rb:9:in `<top (required)>'
/home/riastradh/pkgsrc/git/cross/pkg/lib/ruby/3.2.0/rubygems.rb:9:in `require'
The crash happened with and without the ruby-yjit option. I've seen this several times over the past few years (with earlier versions of ruby) so I went digging this time now that I have debug data.
The stack trace from gdb is not helpful -- it looks like the error-reporting logic in the SIGSEGV handler itself crashed with SIGSEGV:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007e845f041dd1 in uleb128 (p=0x7f7fff8b5ac0) at addr2line.c:206
206 unsigned char b = (unsigned char)*(*p)++;
(gdb) bt
#0 0x00007e845f041dd1 in uleb128 (p=0x7f7fff8b5ac0) at addr2line.c:206
#1 di_read_debug_abbrev_cu (reader=0x7f7fff8b5b00) at addr2line.c:1048
#2 di_read_cu (reader=0x7f7fff8b5b00) at addr2line.c:1737
#3 fill_lines (num_traces=num_traces@entry=5,
traces=traces@entry=0x7e845f394780 <trace>,
check_debuglink=check_debuglink@entry=1, objp=objp@entry=0x7f7fff8b6478,
lines=lines@entry=0x7e845f504f80, offset=offset@entry=0)
at addr2line.c:2167
#4 0x00007e845f043bc1 in rb_dump_backtrace_with_lines (
num_traces=<optimized out>, traces=traces@entry=0x7e845f394780 <trace>)
at addr2line.c:2611
#5 0x00007e845f039670 in rb_print_backtrace () at vm_dump.c:787
#6 0x00007e845f03976c in rb_vm_bugreport (ctx=ctx@entry=0x0) at vm_dump.c:1080
#7 0x00007e845eeb2598 in rb_bug_for_fatal_signal (default_sighandler=0x0,
sig=sig@entry=11, ctx=ctx@entry=0x0,
fmt=fmt@entry=0x7e845f08a6ea "Segmentation fault") at error.c:813
#8 0x00007e845efb83b0 in sigsegv (sig=11) at signal.c:964
#9 0x00007e845d0a1da0 in _opendir (name=<optimized out>)
at /usr/src/9/lib/libc/gen/opendir.c:72
#10 0x000000010000000b in ?? ()
#11 0x0000000000000000 in ?? ()
Digging into ruby32-base, I discovered that on NetBSD, and only on NetBSD, Ruby avoids sigaltstack for the SIGSEGV handler, and also avoids getting at the siginfo_t. The ChangeLog suggests sigaltstack was disabled on NetBSD back in 2010, probably for the benefit of the ancient netbsd<=5 ABI where the pthread id was based on the stack pointer rather than stored in a thread-local storage register as it has been for a long time:
Mon Feb 15 17:42:20 2010 NARUSE, Yui <naruse@ruby-lang.org>
* signal.c (USE_SIGALTSTACK): NetBSD can't use sigaltstack(2)
with pthread.
http://netbsd.gw.com/cgi-bin/man-cgi?sigaltstack++NetBSD-current
The note about incompatibility of sigaltstack(2) with pthread was taken out of NetBSD's man page in 2012, some time after it became irrelevant with the introduction of thread-local storage support in netbsd-6.
I tried patching vm_core.h in ruby32-base to re-enable sigaltstack in order to get better diagnostics with the following patch:
$NetBSD$
Enable sigaltstack(2) again on NetBSD. This has not been relevant for
a very long time, probably since NetBSD 6.
--- vm_core.h.orig 2024-10-30 09:47:11.000000000 +0000
+++ vm_core.h
@@ -148,7 +148,7 @@ extern int ruby_assert_critical_section_
/* define to 0 to test old code path */
#define WAITPID_USE_SIGCHLD (RUBY_SIGCHLD || SIGCHLD_LOSSY)
-#if defined(SIGSEGV) && defined(HAVE_SIGALTSTACK) && defined(SA_SIGINFO) && !defined(__NetBSD__)
+#if defined(SIGSEGV) && defined(HAVE_SIGALTSTACK) && defined(SA_SIGINFO)
# define USE_SIGALTSTACK
void *rb_allocate_sigaltstack(void);
void *rb_register_sigaltstack(void *);
When I did this, I was not able to get better diagnostics out of gdb...because asciidoctor just worked and didn't crash any more! Tried both with and without ruby-yjit, worked either way.
I still don't know what provoked the original SIGSEGV. But we should maybe just allow Ruby to use sigaltstack on NetBSD like it does on all the other platforms.
>How-To-Repeat:
try to use textproc/ruby-asciidoctor on netbsd-9, probably
>Fix:
1. patch away the `&& !defined(__NetBSD__)' condition on the use of sigaltstack in lang/ruby32-base
2. maybe do the same for lang/ruby31-base, lang/ruby33, lang/ruby34, and anything in wip
3. submit the patch upstream (maybe conditionalized on __NetBSD_Version__ being at least netbsd-6 if they care about really old NetBSD)
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->taca
Responsible-Changed-By: riastradh@NetBSD.org
Responsible-Changed-When: Tue, 21 Jan 2025 11:52:22 +0000
Responsible-Changed-Why:
Could I trouble you to take a look, and if you think this is a good
idea, submit it upstream?
From: Takahiro Kambe <taca@NetBSD.org>
To: gnats-bugs@netbsd.org, campbell+netbsd@mumble.net
Cc:
Subject: Re: pkg/59017: ruby32 crashes in asciidoctor
Date: Tue, 21 Jan 2025 23:32:27 +0900 (JST)
Hi,
In message <20250121101000.819DC1A923C@mollari.NetBSD.org>
on Tue, 21 Jan 2025 10:10:00 +0000 (UTC),
campbell+netbsd@mumble.net wrote:
>>Number: 59017
>>Category: pkg
>>Synopsis: ruby32 crashes in asciidoctor
>>Confidential: no
>>Severity: serious
>>Priority: medium
>>Responsible: pkg-manager
>>State: open
>>Class: sw-bug
>>Submitter-Id: net
>>Arrival-Date: Tue Jan 21 10:10:00 +0000 2025
>>Originator: Taylor R Campbell
>>Release: netbsd-9 userland on netbsd-10 kernel, pkgsrc-current, ruby32-base-3.2.5
I beleive it is ruby32-base-3.2.6.
And I could not reproduce the problem on my NetBSD 10.0_STABLE environment.
>>Organization:
> The NetBSigaltstackD Gemdation
>>Environment:
>>Description:
> While trying to build a package that uses asciidoctor, ruby crashes with SIGSEGV:
>
> asciidoctor --require=./doc/man.rb --backend=manpage doc/manpage-newsboat.asciidoc
Is there any example file to reproduce this problem?
--
Takahiro Kambe <taca@NetBSD.org>
From: Taylor R Campbell <riastradh@NetBSD.org>
To: Takahiro Kambe <taca@NetBSD.org>
Cc: gnats-bugs@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: pkg/59017: ruby32 crashes in asciidoctor
Date: Tue, 21 Jan 2025 16:51:07 +0000
> Date: Tue, 21 Jan 2025 23:32:27 +0900 (JST)
> From: Takahiro Kambe <taca@NetBSD.org>
>=20
> >>Release: netbsd-9 userland on netbsd-10 kernel, pkgsrc-current, =
ruby32-base-3.2.5
> I beleive it is ruby32-base-3.2.6.
Yes, you're right, copypasta error.
$ pkg_info -I ruby32-base
ruby32-base-3.2.6 Ruby 3.2.6 release minimum base package
> > While trying to build a package that uses asciidoctor, ruby crashes wit=
h SIGSEGV:
> >=20
> > asciidoctor --require=3D./doc/man.rb --backend=3Dmanpage doc/manpage-n=
ewsboat.asciidoc
> Is there any example file to reproduce this problem?
I pushed the package to wip/newsboat237; maybe you can use that to
reproduce it. If that's not convenient I can try pulling out the
asciidoc input to see if it reproduces outside the build environment.
That said, while I think it's worthwhile to diagnose how this crashed,
what do you think of removing the special case of avoiding sigaltstack
on NetBSD?
From: Taylor R Campbell <riastradh@NetBSD.org>
To: Takahiro Kambe <taca@NetBSD.org>
Cc: gnats-bugs@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: pkg/59017: ruby32 crashes in asciidoctor
Date: Tue, 21 Jan 2025 19:16:43 +0000
OK, I spoke too soon: the crash still happens sometimes with the
patch, but it's stochastic; I guess I just got lucky with the first
few trials.
However, with the patch to enable sigaltstack -- and, more
importantly, to enable SA_SIGINFO -- I have more information now.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007a007667b701 in uleb128 (p=3D0x7a007623dca0) at addr2line.c:206
206 addr2line.c: No such file or directory.
(gdb) bt
#0 0x00007a007667b701 in uleb128 (p=3D0x7a007623dca0) at addr2line.c:206
#1 di_read_debug_abbrev_cu (reader=3D0x7a007623dce0) at addr2line.c:1048
#2 di_read_cu (reader=3D0x7a007623dce0) at addr2line.c:1737
#3 fill_lines (num_traces=3Dnum_traces@entry=3D5,
traces=3Dtraces@entry=3D0x7a0076b26680 <trace>,
check_debuglink=3Dcheck_debuglink@entry=3D1, objp=3Dobjp@entry=3D0x7a00=
7623e658,
lines=3Dlines@entry=3D0x7a0075eb6a00, offset=3Doffset@entry=3D0)
at addr2line.c:2167
#4 0x00007a007667d4f1 in rb_dump_backtrace_with_lines (
num_traces=3D<optimized out>, traces=3Dtraces@entry=3D0x7a0076b26680 <t=
race>)
at addr2line.c:2611
#5 0x00007a00766716d0 in rb_print_backtrace () at vm_dump.c:787
#6 0x00007a00766717cc in rb_vm_bugreport (ctx=3Dctx@entry=3D0x7a007623ea20)
at vm_dump.c:1080
#7 0x00007a00764e9f98 in rb_bug_for_fatal_signal (default_sighandler=3D0x0,
sig=3Dsig@entry=3D11, ctx=3Dctx@entry=3D0x7a007623ea20,
fmt=3Dfmt@entry=3D0x7a00767bb52e "Segmentation fault at %p") at error.c=
:813
#8 0x00007a00765f0084 in sigsegv (sig=3D11, info=3D0x7a007623e9a0,
ctx=3D0x7a007623ea20) at signal.c:964
#9 0x00007a00746a1da0 in _opendir (name=3D<optimized out>)
at /usr/src/9/lib/libc/gen/opendir.c:72
#10 0x000000010000000b in ?? ()
#11 0x0000000000000000 in ?? ()
(gdb) fr 8
#8 0x00007a00765f0084 in sigsegv (sig=3D11, info=3D0x7a007623e9a0,
ctx=3D0x7a007623ea20) at signal.c:964
964 rb_bug_for_fatal_signal(default_sigsegv_handler, sig, SIGINFO_C=
TX, "Segmentation fault" MESSAGE_FAULT_ADDRESS);
(gdb) print *info
$1 =3D {
si_pad =3D "\v\000\000\000\001", '\000' <repeats 12 times>, "\240\000\377=
\177\177\000\000\006", '\000' <repeats 102 times>, _info =3D {_signo =3D 11=
, _code =3D 1,
_errno =3D 0, _pad =3D 0, _reason =3D {_rt =3D {_pid =3D -16736256, _ui=
d =3D 32639,
_value =3D {sival_int =3D 6, sival_ptr =3D 0x6}}, _child =3D {
_pid =3D -16736256, _uid =3D 32639, _status =3D 6, _utime =3D 0, _s=
time =3D 0},
_fault =3D {_addr =3D 0x7f7fff00a000, _trap =3D 6, _trap2 =3D 0, _tra=
p3 =3D 0},
_poll =3D {_band =3D 140187715805184, _fd =3D 6}, _syscall =3D {
_sysnum =3D -16736256, _retval =3D {32639, 6}, _error =3D 0, _args =
=3D {0, 0,
0, 0, 0, 0, 0, 0}}, _ptrace_state =3D {_pe_report_event =3D -1673=
6256,
_option =3D {_pe_other_pid =3D 32639, _pe_lwp =3D 32639}}}}}
(gdb) print *(ucontext_t *)ctx
$2 =3D {uc_flags =3D 655373, uc_link =3D 0x0, uc_sigmask =3D {__bits =3D {0=
, 0, 0, 0}},
uc_stack =3D {ss_sp =3D 0x0, ss_size =3D 0, ss_flags =3D 0}, uc_mcontext =
=3D {
__gregs =3D {134142411075584, 118, 3353560262451, 22, 134142403527024, =
32,
1, 514, 134142411075584, 140187715785200, 134142403577003,
134142411075624, 349634, 2498, 134142410498040, 0, 0, 35, 35, 6, 4,
134142403527117, 71, 66054, 140187715785152, 63},
_mc_tlsbase =3D 134142411307248,
__fpregs =3D "\177\003", '\000' <repeats 22 times>, "\240\037\000\000\3=
77\377", '\000' <repeats 130 times>, "\\\217\302\365(\\oA", '\000' <repeats=
14 times>, "\340C", '\000' <repeats 327 times>}}
Instruction pointer (rip) of the signal ucontext:
(gdb) print (void *)((ucontext_t *)ctx)->uc_mcontext.__gregs[21]
$4 =3D (void *) 0x7a00764fc1cd <each_location+27>
(gdb) info line *(each_location+27)
Line 6512 of "gc.c" starts at address 0x7a00764fc1cd <each_location+27>
and ends at 0x7a00764fc1dc <each_location+42>.
Stack pointer (rsp) of the signal ucontext:
(gdb) print (void *)((ucontext_t *)ctx)->uc_mcontext.__gregs[24]
$5 =3D (void *) 0x7f7fff0051c0
If I have understood this correctly, it might correspond to this
frame;
(gdb) frame view 0x7f7fff0051c0 0x7a00764fc1cd
#0 each_location (objspace=3D0x7a006e052000, x=3D0x44a0427a1af34, n=3D-123=
985769,
cb=3D0x3) at gc.c:6512
6512 cb(objspace, v);
(gdb) info frame
Stack level 0, frame at 0x7f7fff0051c0:
rip =3D 0x7a00764fc1cd in each_location (gc.c:6512); saved rip =3D <not sa=
ved>
Outermost frame: previous frame identical to this frame (corrupt stack?)
source language c.
Arglist at 0x7a007623dae8, args: objspace=3D0x7a006e052000, x=3D0x44a0427a=
1af34,
n=3D-123985769, cb=3D0x3
Locals at 0x7a007623dae8, Previous frame's sp is 0x7a007623db20
Saved registers:
rbx at 0x7a007623daf0, rbp at 0x7a007623daf8, r12 at 0x7a007623db00,
r13 at 0x7a007623db08, r14 at 0x7a007623db10, rip at 0x7a007623db18
However, the frame pointer rbp looks wrong:
(gdb) print (void *)((ucontext_t *)ctx)->uc_mcontext.__gregs[12]
$11 =3D (void *) 0x555c2
And the candidate value for objspace shown above isn't mapped:
(gdb) print *objspace
Cannot access memory at address 0x7a006e052000
Plus the value of n looks wrong, so maybe I misunderstood the mcontext
and led gdb astray with `frame view'.
Disassembly of each_location:
(gdb) disas each_location+27
Dump of assembler code for function each_location:
0x00007a00764fc1b2 <+0>: test %rdx,%rdx
0x00007a00764fc1b5 <+3>: je 0x7a00764fc1ea <each_location+56>
0x00007a00764fc1b7 <+5>: push %r14
0x00007a00764fc1b9 <+7>: push %r13
0x00007a00764fc1bb <+9>: push %r12
0x00007a00764fc1bd <+11>: push %rbp
0x00007a00764fc1be <+12>: push %rbx
0x00007a00764fc1bf <+13>: mov %rcx,%r14
0x00007a00764fc1c2 <+16>: mov %rdx,%rbp
0x00007a00764fc1c5 <+19>: mov %rsi,%r13
0x00007a00764fc1c8 <+22>: mov %rdi,%r12
0x00007a00764fc1cb <+25>: xor %ebx,%ebx
=3D> 0x00007a00764fc1cd <+27>: mov 0x0(%r13,%rbx,8),%rsi
0x00007a00764fc1d2 <+32>: mov %r12,%rdi
0x00007a00764fc1d5 <+35>: callq *%r14
0x00007a00764fc1d8 <+38>: add $0x1,%rbx
0x00007a00764fc1dc <+42>: cmp %rbx,%rbp
0x00007a00764fc1df <+45>: jne 0x7a00764fc1cd <each_location+27>
0x00007a00764fc1e1 <+47>: pop %rbx
0x00007a00764fc1e2 <+48>: pop %rbp
0x00007a00764fc1e3 <+49>: pop %r12
0x00007a00764fc1e5 <+51>: pop %r13
0x00007a00764fc1e7 <+53>: pop %r14
0x00007a00764fc1e9 <+55>: retq =20
0x00007a00764fc1ea <+56>: retq =20
End of assembler dump.
r13 (__gregs[9]) and rbx (__gregs[13]):
(gdb) fr 8
#8 0x00007a00765f0084 in sigsegv (sig=3D11, info=3D0x7a007623e9a0,=20
ctx=3D0x7a007623ea20) at signal.c:964
964 rb_bug_for_fatal_signal(default_sigsegv_handler, sig, SIGINFO_C=
TX, "Segmentation fault" MESSAGE_FAULT_ADDRESS);
(gdb) print (void *)((ucontext_t *)ctx)->uc_mcontext.__gregs[9]
$9 =3D (void *) 0x7f7fff0051f0
(gdb) print (void *)((ucontext_t *)ctx)->uc_mcontext.__gregs[13]
$10 =3D (void *) 0x9c2
The base pointer (r13=3D0x7f7fff0051f0) is OK but adding the index
(rbx*8=3D0x9c2*8) is not -- this obviously ran just past the end of a
mapped region:
(gdb) x/xg 0x7f7fff0051f0
0x7f7fff0051f0: 0x00007a0076c2f000
(gdb) x/xg 0x7f7fff0051f0 + 0x9c2*8
0x7f7fff00a000: Cannot access memory at address 0x7f7fff00a000
(gdb) x/xg 0x7f7fff0051f0 + 0x9c2*8 - 8
0x7f7fff009ff8: 0x0000000000000076
From: Takahiro Kambe <taca@NetBSD.org>
To: riastradh@NetBSD.org
Cc: gnats-bugs@NetBSD.org
Subject: Re: pkg/59017: ruby32 crashes in asciidoctor
Date: Tue, 11 Feb 2025 15:30:34 +0900 (JST)
In message <20250121165111.957D084E7D@mail.netbsd.org>
on Tue, 21 Jan 2025 16:51:07 +0000,
Taylor R Campbell <riastradh@NetBSD.org> wrote:
> I pushed the package to wip/newsboat237; maybe you can use that to
> reproduce it. If that's not convenient I can try pulling out the
> asciidoc input to see if it reproduces outside the build environment.
I tried to test with wip/newsboat237 but I could not fetch
curl-sys-0.4.75+curl-8.10.0.crate.
--
Takahiro Kambe <taca@NetBSD.org>
From: Takahiro Kambe <taca@NetBSD.org>
To: riastradh@NetBSD.org
Cc: gnats-bugs@NetBSD.org
Subject: Re: pkg/59017: ruby32 crashes in asciidoctor
Date: Tue, 11 Feb 2025 16:08:50 +0900 (JST)
In message <20250211.153034.652185085790951569.taca@back-street.net>
on Tue, 11 Feb 2025 15:30:34 +0900 (JST),
Takahiro Kambe <taca@NetBSD.org> wrote:
> I tried to test with wip/newsboat237 but I could not fetch
> curl-sys-0.4.75+curl-8.10.0.crate.
I found out that devel/git-remote-hg fails, too.
--
Takahiro Kambe <taca@NetBSD.org>
From: Takahiro Kambe <taca@NetBSD.org>
To: riastradh@NetBSD.org
Cc: gnats-bugs@NetBSD.org
Subject: Re: pkg/59017: ruby32 crashes in asciidoctor
Date: Tue, 11 Feb 2025 16:17:44 +0900 (JST)
In message <20250211.160850.1952963749944404041.taca@back-street.net>
on Tue, 11 Feb 2025 16:08:50 +0900 (JST),
Takahiro Kambe <taca@NetBSD.org> wrote:
> In message <20250211.153034.652185085790951569.taca@back-street.net>
> on Tue, 11 Feb 2025 15:30:34 +0900 (JST),
> Takahiro Kambe <taca@NetBSD.org> wrote:
>> I tried to test with wip/newsboat237 but I could not fetch
>> curl-sys-0.4.75+curl-8.10.0.crate.
> I found out that devel/git-remote-hg fails, too.
And it was first time only to crash...
--
Takahiro Kambe <taca@NetBSD.org>
From: Thomas Klausner <wiz@gatalith.at>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc:
Subject: Re: pkg/59017: ruby32 crashes in asciidoctor
Date: Sat, 22 Mar 2025 09:17:37 +0100
I think this has enough information now to report it upstream - taca@
would only be an intermediary.
Can you please report this upstream directly?
Thomas
From: "Takahiro Kambe" <taca@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59017 CVS commit: pkgsrc/lang
Date: Sat, 26 Jul 2025 06:17:00 +0000
Module Name: pkgsrc
Committed By: taca
Date: Sat Jul 26 06:17:00 UTC 2025
Modified Files:
pkgsrc/lang/ruby: rubyversion.mk
pkgsrc/lang/ruby34: Makefile PLIST distinfo
pkgsrc/lang/ruby34/patches: patch-configure patch-lib_rdoc_encoding.rb
Added Files:
pkgsrc/lang/ruby34/patches: patch-vm__core.h
Removed Files:
pkgsrc/lang/ruby34/patches: patch-ext_win32_lib_win32_resolv.rb
patch-ext_win32_resolv_resolv.c patch-lib_resolv.rb
patch-test_resolv_test__dns.rb
Log Message:
lang/ruby34: update to 3.4.5
pkgsrc change:
* Enable sigaltstack(2) on NetBSD refering to PR pkg/59017.
Ruby 3.4.5 (2025-07-15)
* Bug #21340: Bump autoconf version to properly handle C23 bool/stdbool
defines
* Sync lockfile from rubygems/rubygems by deivid-rodriguez · Pull Request
#13472
* Bug #21438: use-after-free when resizing exivars
* Ensure that memory is not freed before calling
free_fast_fallback_getaddrinfo_* by shioimm · Pull Request #12661
* Fix heap-use-after-free in free_fast_fallback_getaddrinfo_entry by shioimm
Pull Request #13231
* Bug #21441: SEGV during thread cleanup if profiler calls
thread_profiles_frames at wrong time
* Bug #21255: Can't build Ruby with Windows SDK 10.0.26100
* Backport GH-13617 for s390x by hsbt · Pull Request #13757
* Bump up resolv-0.6.2 for Ruby 3.4 by hsbt · Pull Request #13818
* Bug #21197: Prism does not accept newline after defined? keyword
* Bug #21333: heap-use-after-free caused by rehash during update
* Bug #21357: Crash in Hash#merge! with ruby-dev in rubocop-rspec test suite
* Bug #21383: Prism leaks memory with invalid yield
* Bug #21394: Memory leak in Prism's RubyVM::InstructionSequence.new
* Bug #21099: TestGc#test_gc_stress_at_startup assertion failure
* Bug #21395: Please backport caa6ba1a46afa1bc696adc5fe91ee992f9570c89
* Bug #21439: Crash with PM_SPLAT_NODE compiler error (Prism)
* Bug #21354: Symbol#to_proc is not ractor safe
* Bug #20009: Marshal.load raises exception when load dumped class include
non-ASCII
* Bug #21380: Use-After-Free in String#split with In-Block String
Modification
* Bug #21447: Fix handling of PM_CONSTANT_PATH_NODE node in keyword
arguments with ARGS_SPLAT
* Bug #21448: Random.urandom may fail to fall back to reading /dev/urandom
on Linux < 3.17
* Bug #21440: Cannot create instances of frozen Data subclasses
* Bug #21437: Date#hash may return different values for equal dates with
large years
* Bug #21497: building issue when using gcc15, because C23 is default
* Bug #21500: Backport gcc 15 support
To generate a diff of this commit:
cvs rdiff -u -r1.301 -r1.302 pkgsrc/lang/ruby/rubyversion.mk
cvs rdiff -u -r1.6 -r1.7 pkgsrc/lang/ruby34/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/ruby34/PLIST
cvs rdiff -u -r1.8 -r1.9 pkgsrc/lang/ruby34/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/ruby34/patches/patch-configure
cvs rdiff -u -r1.1 -r0 \
pkgsrc/lang/ruby34/patches/patch-ext_win32_lib_win32_resolv.rb \
pkgsrc/lang/ruby34/patches/patch-ext_win32_resolv_resolv.c \
pkgsrc/lang/ruby34/patches/patch-lib_resolv.rb \
pkgsrc/lang/ruby34/patches/patch-test_resolv_test__dns.rb
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/lang/ruby34/patches/patch-lib_rdoc_encoding.rb
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/ruby34/patches/patch-vm__core.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Takahiro Kambe" <taca@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59017 CVS commit: pkgsrc/lang
Date: Sat, 26 Jul 2025 06:21:36 +0000
Module Name: pkgsrc
Committed By: taca
Date: Sat Jul 26 06:21:36 UTC 2025
Modified Files:
pkgsrc/lang/ruby: rubyversion.mk
pkgsrc/lang/ruby32-base: Makefile PLIST distinfo
pkgsrc/lang/ruby32-base/patches: patch-configure
Added Files:
pkgsrc/lang/ruby32-base/patches:
patch-.bundle_gems_net-imap-0.3.9_net-imap.gemspec patch-vm__core.h
Removed Files:
pkgsrc/lang/ruby32-base/patches: patch-lib_resolv.gemspec
patch-lib_resolv.rb patch-test_resolv_test__dns.rb
patch-tool_rbinstall.rb
Log Message:
lang/ruby32: update to 3.2.9
pkgsrc change:
* Enable sigaltstack(2) on NetBSD refering to PR pkg/59017.
* Fix file encoding problem of net-imap bundled gem.
Ruby 3.2.9 (2025-07-24)
This release includes the following security fixes:
* CVE-2025-24294: Possible Denial of Service in resolv gem
* CVE-2025-43857: DoS vulnerability in net-imap
and the following fixes for build issues:
* GCC 15.1
* Visual Studio 2022 Version 17.14
What's Changed
* Bug #21286: Windows - MSYS2 just updated to GCC 15.1.0, builds failing
* Bug #21255: Can't build Ruby with Windows SDK 10.0.26100
To generate a diff of this commit:
cvs rdiff -u -r1.302 -r1.303 pkgsrc/lang/ruby/rubyversion.mk
cvs rdiff -u -r1.11 -r1.12 pkgsrc/lang/ruby32-base/Makefile
cvs rdiff -u -r1.7 -r1.8 pkgsrc/lang/ruby32-base/PLIST
cvs rdiff -u -r1.16 -r1.17 pkgsrc/lang/ruby32-base/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/lang/ruby32-base/patches/patch-.bundle_gems_net-imap-0.3.9_net-imap.gemspec \
pkgsrc/lang/ruby32-base/patches/patch-vm__core.h
cvs rdiff -u -r1.3 -r1.4 pkgsrc/lang/ruby32-base/patches/patch-configure
cvs rdiff -u -r1.1 -r0 \
pkgsrc/lang/ruby32-base/patches/patch-lib_resolv.gemspec \
pkgsrc/lang/ruby32-base/patches/patch-lib_resolv.rb \
pkgsrc/lang/ruby32-base/patches/patch-test_resolv_test__dns.rb \
pkgsrc/lang/ruby32-base/patches/patch-tool_rbinstall.rb
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Takahiro Kambe" <taca@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59017 CVS commit: pkgsrc/lang
Date: Sat, 26 Jul 2025 06:25:23 +0000
Module Name: pkgsrc
Committed By: taca
Date: Sat Jul 26 06:25:23 UTC 2025
Modified Files:
pkgsrc/lang/ruby: rubyversion.mk
pkgsrc/lang/ruby33: Makefile PLIST distinfo
pkgsrc/lang/ruby33/patches: patch-configure
Added Files:
pkgsrc/lang/ruby33/patches: patch-tool_leaked-globals patch-vm__core.h
Removed Files:
pkgsrc/lang/ruby33/patches: patch-lib_resolv.rb
patch-test_resolv_test__dns.rb
Log Message:
lang/ruby33: update to 3.3.9
pkgsrc change:
* Enable sigaltstack(2) on NetBSD refering to PR pkg/59017.
* Make "make test" pass.
Ruby 3.3.9 (2025-07-24)
What's Changed
* Bug #21286: Windows - MSYS2 just updated to GCC 15.1.0, builds failing
* Bug #21220: Memory corruption in update_line_coverage() [write at index
-1]
* Bug #21331: heap-use-after-free caused by rehash during transform_values!
* Bug #21327: Windows builds seem broken after clock_gettime changes?
* Bug #21344: Segment Fault Caused by no Backported Patches
* Bug #21257: YJIT can generate infinite loop when OOM
* Bug #21333: heap-use-after-free caused by rehash during update
* Bug #21357: Crash in Hash#merge! with ruby-dev in rubocop-rspec test suite
* Bug #21310: YJIT optimization causes incorrect is_a? method evaluation
* Bug #21354: Symbol#to_proc is not ractor safe
* Bug #21340: Bump autoconf version to properly handle C23 bool/stdbool
defines
* Bug #21283: Some tests of TestMkmfConvertible is failing with VS2022
17.14.0 preview 4.0
* Bug #21255: Can't build Ruby with Windows SDK 10.0.26100
* Bug #21380: Use-After-Free in String#split with In-Block String
Modification
* Bug #21440: Cannot create instances of frozen Data subclasses
* Bug #21437: Date#hash may return different values for equal dates with
large years
* Bug #21441: SEGV during thread cleanup if profiler calls
thread_profiles_frames at wrong time
* Bug #21438: use-after-free when resizing exivars
* Bug #20009: Marshal.load raises exception when load dumped class include
non-ASCII
* Bug #21448: Random.urandom may fail to fall back to reading /dev/urandom
on Linux < 3.17
* Bug #21497: building issue when using gcc15, because C23 is default
* Fix bigand_int edgecase returning false by tompng · Pull Request #13987
To generate a diff of this commit:
cvs rdiff -u -r1.303 -r1.304 pkgsrc/lang/ruby/rubyversion.mk
cvs rdiff -u -r1.6 -r1.7 pkgsrc/lang/ruby33/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/lang/ruby33/PLIST
cvs rdiff -u -r1.13 -r1.14 pkgsrc/lang/ruby33/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/ruby33/patches/patch-configure
cvs rdiff -u -r1.1 -r0 pkgsrc/lang/ruby33/patches/patch-lib_resolv.rb \
pkgsrc/lang/ruby33/patches/patch-test_resolv_test__dns.rb
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/ruby33/patches/patch-tool_leaked-globals \
pkgsrc/lang/ruby33/patches/patch-vm__core.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: nia <nia@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/59017: ruby32 crashes in asciidoctor
Date: Wed, 1 Oct 2025 12:10:17 +0000
I have a segfault bootstrapping ruby,
which riastradh asked me to post here as a reply:
./miniruby: [BUG] Segmentation fault
ruby 3.2.6 (2024-10-30 revision 63aeb018eb) [x86_64-netbsd]
-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0003 E:001c70 DUMMY [FINISH]
-- C level backtrace information -------------------------------------------
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_profile_frame_full_label) [0x265321]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_bug_reporter_add) [0xcbbdd]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_shape_memsize) [0x1dc9b5]
/usr/lib/libc.so.12(__sigtramp_siginfo_2+0x0) [0x777decb435a0]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_find_file) [0xdebde]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_find_file) [0xdfbce]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_gc_mark_maybe) [0xeb3dd]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_gc_verify_internal_consistency) [0xedb4a]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(ruby_sized_xrealloc2) [0xf3a61]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_wb_protected_newobj_of) [0xf43ab]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_str_make_embedded) [0x1efc54]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_enc_str_new) [0x1f2698]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_intern3) [0x20b92f]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_parser_printf) [0x175d14]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_yytnamerr) [0x17b03e]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_yytnamerr) [0x188804]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_exec_event_hooks) [0x2683e8]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_parser_printf) [0x176ea4]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_locale_charmap) [0x597c7]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_locale_charmap) [0x59cfb]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_locale_charmap) [0x59dac]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(rb_env_clear) [0xfebc5]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(ruby_set_script_name) [0x1d916c]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(ruby_process_options) [0x1da281]
/encrypt/home/nia/git/dreckly/lang/ruby32-base/work/ruby-3.2.6/./miniruby(ruby_options) [0xd49aa]
[0x2735de]
-- Other runtime information -----------------------------------------------
builtin_binary.inc updated
gmake: *** [uncommon.mk:879: .rbconfig.time] Abort trap (core dumped)
gmake: *** Waiting for unfinished jobs....
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.