develooper Front page | perl.perl5.porters | Postings from April 2019

[perl #133603] 5.29.4 - re/subst.t crashes perl on 64-bit Windows

Thread Previous
From:
sisyphus@cpan.org via RT
Date:
April 2, 2019 02:31
Subject:
[perl #133603] 5.29.4 - re/subst.t crashes perl on 64-bit Windows
Message ID:
rt-4.0.24-23862-1554172307-775.133603-15-0@perl.org
On Tue, 04 Dec 2018 07:26:12 -0800, public@khwilliamson.com wrote:
> On 12/4/18 7:02 AM, Tomasz Konojacki wrote:
> > On Tue, 04 Dec 2018 03:31:29 -0800
> > "sisyphus@cpan.org via RT" <perlbug-followup@perl.org> wrote:
> >
> >> Reverting those changes to win32/config.gc and win32/config_H.gc
> >> also works for me - and I'll continue to make those changes whenever
> >> I build perl using my mingw-w64 port of 64-bit gcc-8.1.0. (I already
> >> patch those 2 files for my own builds as a result of #133582,
> >> anyway.)
> >>
> >> If anyone comes up with a C program that demonstrates this gcc bug,
> >> please let me know as I'd like to file a bug report for it with the
> >> mingw-w64 project.
> >> In the meantime I'll try to create that demo myself.
> >>
> >> Thanks Tony.
> >>
> >> Cheers,
> >> Rob
> >>
> >
> > I also am trying to find the cause of the crash, but I'm having no
> > luck
> > so far. However, I managed to narrow it down a bit. Removing
> > UNLIKELY()
> > from SvGETMAGIC() macro makes it not crash:
> >
> > diff --git a/sv.h b/sv.h
> > index f3392b08ec..58c3a8f33c 100644
> > --- a/sv.h
> > +++ b/sv.h
> > @@ -2055,7 +2055,7 @@ properly null terminated. Equivalent to
> > sv_setpvs(""), but more efficient.
> >   #define SvUNLOCK(sv) PL_unlockhook(aTHX_ sv)
> >   #define SvDESTROYABLE(sv) PL_destroyhook(aTHX_ sv)
> >
> > -#define SvGETMAGIC(x) ((void)(UNLIKELY(SvGMAGICAL(x)) && mg_get(x)))
> > +#define SvGETMAGIC(x) ((void)((SvGMAGICAL(x)) && mg_get(x)))
> >   #define SvSETMAGIC(x) STMT_START { if (UNLIKELY(SvSMAGICAL(x)))
> > mg_set(x); } STMT_END
> >
> > #define SvSetSV_and(dst,src,finally) \
> >
> 
> In the meantime, it seems that a hints directive could be used on
> mingw
> to make UNLIKELY and LIKELY do nothing, and that could be put in
> blead.

Hi,
I'm still experiencing the issue with each and every devel release of perl-5.29.x, and I'm still fixing it by reverting the changes to win32/config.gc and win32/config_H.gc (as mentioned a coupla posts back in this thread).

My gcc-8.1.0 was built by the mingw-w64 project, and today I've also built latest devel release (5.29.9) using a gcc-8.2.1 toolchain that was built by the msys2 project.

That build of perl also experienced the same issues as the gcc-8.1.0 build, and those issues were again resolved when I reverted the changes to win32/config.gc and win32/config_H.gc.

So we can now say that this issue afflicts both 64-bit gcc-8.1.0 (with mingw runtime version 6.0) and 64-bit gcc-8.2.1 (with mingw runtime version 7.0).

Ought this be deemed a blocker for 5.30 ?

Personally, I've no objection to continuing to revert win32/config.gc and win32/config_H.gc for my local builds.

Cheers,
Rob




---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=133603

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About