Front page | perl.perl5.porters |
Postings from June 2019
[perl #134172] commit 027471cf breaks t/op/sprintf2.t on FreeBSD-11
Thread Previous
|
Thread Next
From:
James E Keenan via RT
Date:
June 6, 2019 15:12
Subject:
[perl #134172] commit 027471cf breaks t/op/sprintf2.t on FreeBSD-11
Message ID:
rt-4.0.24-26846-1559833954-1365.134172-15-0@perl.org
On Thu, 06 Jun 2019 14:17:46 GMT, hv wrote:
> On Thu, 06 Jun 2019 04:37:28 -0700, jkeenan wrote:
> > I let it run overnight. No difference in results.
>
> Oh, that's sad, it's clearly hanging in that time() call for some
> reason.
>
> Let's try a different approach, closer to the likely source of the
> problem. Line 12950 of sv.c should be "float_need = 1 /* possible
> unary minus */", the point we start handling the large number in the
> sprintf pattern. Check that this is the right line, and thn try the
> following:
>
> shell% gdb --args ./perl -we 'my $x = sprintf("%7000000000E", 0)'
> (gdb) break sv.c:12950
> (gdb) run
> Breakpoint 1, Perl_sv_vcatpvfn_flags (my_perl=0xd43260, sv=0xd72e78,
> pat=0xd76368 "%7000000000E", patlen=12, args=0x0,
> svargs=0xd48b18,
> sv_count=1, maybe_tainted=0x7fffffffd2ff, flags=0) at sv.c:12950
> 12950 float_need = 1 /* possible unary minus */
>
> and then:
> (gdb) disp PL_locale_mutex
> (gdb) disp *PL_locale_mutex
> (gdb) next
> .. and repeat 'next' about 15 times until the Perl_croak() call. If
> the displayed values haven't changed by this point, try 'cont' to see
> if they do change by the time we hit the SEGV.
>
> Hugo
#####
$ ./perl -Ilib -V:config_args
config_args='-des -Dusedevel -Duseithreads -Doptimize=-O2 -pipe -fstack-protector -fno-strict-aliasing -DDEBUGGING';
[perl] $ gdb --args ./perl -we 'my $x = sprintf("%7000000000E", 0)'
GNU gdb 6.1.1 [FreeBSD]
[snip]
(gdb) break sv.c:12950
Breakpoint 1 at 0x557e4e: file sv.c, line 12950.
(gdb) run
Starting program: /usr/home/jkeenan/gitwork/perl/perl -we my\ \$x\ =\ sprintf\(\"%7000000000E\",\ 0\)
Breakpoint 1, Perl_sv_vcatpvfn_flags (my_perl=<value optimized out>, sv=<value optimized out>,
pat=<value optimized out>, patlen=<value optimized out>, args=0x0, svargs=0x801e16528,
sv_count=1, maybe_tainted=0x801c02200, flags=0) at sv.c:12967
12967 if (!lc_numeric_set) {
(gdb) disp PL_locale_mutex
1: PL_locale_mutex = 0x801e1c1e0
(gdb) disp *PL_locale_mutex
2: *PL_locale_mutex = {m_lock = {m_owner = 0, m_flags = 0, m_ceilings = 0x801e1c1e8, m_rb_lnk = 0,
m_spare = 0x801e1c1f8}, m_flags = 1, m_count = 0, m_spinloops = 0, m_yieldloops = 0, m_ps = 0,
m_qe = {tqe_next = 0x0, tqe_prev = 0x0}, m_pqe = {tqe_next = 0x0, tqe_prev = 0x0}, m_rb_prev = 0x0}
(gdb) next
13092 Perl_croak(aTHX_ "Numeric format result too large");
2: *PL_locale_mutex = {m_lock = {m_owner = 0, m_flags = 0, m_ceilings = 0x801e1c1e8, m_rb_lnk = 0,
m_spare = 0x801e1c1f8}, m_flags = 1, m_count = 0, m_spinloops = 0, m_yieldloops = 0, m_ps = 0,
m_qe = {tqe_next = 0x0, tqe_prev = 0x0}, m_pqe = {tqe_next = 0x0, tqe_prev = 0x0}, m_rb_prev = 0x0}
1: PL_locale_mutex = 0x801e1c1e0
(gdb) next
Breakpoint 1, Perl_sv_vcatpvfn_flags (my_perl=<value optimized out>, sv=<value optimized out>,
pat=<value optimized out>, patlen=<value optimized out>, args=0x0, svargs=0x801e16530,
sv_count=1, maybe_tainted=0x452591, flags=0) at sv.c:12967
12967 if (!lc_numeric_set) {
2: *PL_locale_mutex = {m_lock = {m_owner = 0, m_flags = 0, m_ceilings = 0x801e1c1e8, m_rb_lnk = 0,
m_spare = 0x801e1c1f8}, m_flags = 1, m_count = 0, m_spinloops = 0, m_yieldloops = 0, m_ps = 0,
m_qe = {tqe_next = 0x0, tqe_prev = 0x0}, m_pqe = {tqe_next = 0x0, tqe_prev = 0x0}, m_rb_prev = 0x0}
1: PL_locale_mutex = 0x801e1c1e0
(gdb) next
12972 STORE_LC_NUMERIC_SET_TO_NEEDED();
2: *PL_locale_mutex = {m_lock = {m_owner = 0, m_flags = 0, m_ceilings = 0x801e1c1e8, m_rb_lnk = 0,
m_spare = 0x801e1c1f8}, m_flags = 1, m_count = 0, m_spinloops = 0, m_yieldloops = 0, m_ps = 0,
m_qe = {tqe_next = 0x0, tqe_prev = 0x0}, m_pqe = {tqe_next = 0x0, tqe_prev = 0x0}, m_rb_prev = 0x0}
1: PL_locale_mutex = 0x801e1c1e0
(gdb) next
13092 Perl_croak(aTHX_ "Numeric format result too large");
2: *PL_locale_mutex = {m_lock = {m_owner = 0, m_flags = 0, m_ceilings = 0x801e1c1e8, m_rb_lnk = 0,
m_spare = 0x801e1c1f8}, m_flags = 1, m_count = 0, m_spinloops = 0, m_yieldloops = 0, m_ps = 0,
m_qe = {tqe_next = 0x0, tqe_prev = 0x0}, m_pqe = {tqe_next = 0x0, tqe_prev = 0x0}, m_rb_prev = 0x0}
1: PL_locale_mutex = 0x801e1c1e0
(gdb) next
Numeric format result too large at -e line 1.
Program received signal SIGSEGV, Segmentation fault.
0x0000000000597ad9 in Perl_dounwind (my_perl=0x801e22000, cxix=-1) at pp_ctl.c:1550
1550 CX_LEAVE_SCOPE(cx);
2: *PL_locale_mutex = Error accessing memory address 0x2: Bad address.
Disabling display 2 to avoid infinite recursion.
#####
--
James E Keenan (jkeenan@cpan.org)
---
via perlbug: queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=134172
Thread Previous
|
Thread Next