Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] Fix threads failure under latest 64bit mingw-w64 + gcc 4.6 #11778

Closed
p5pRT opened this issue Nov 28, 2011 · 5 comments
Closed

[PATCH] Fix threads failure under latest 64bit mingw-w64 + gcc 4.6 #11778

p5pRT opened this issue Nov 28, 2011 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented Nov 28, 2011

Migrated from rt.perl.org#104776 (status was 'resolved')

Searchable as RT104776$

@p5pRT
Copy link
Author

p5pRT commented Nov 28, 2011

From @jdhedden

Created by @jdhedden

The attached patch was submitted by mdootson@​cpan.org for
threads bug # 72442​:
  https://rt.cpan.org/Ticket/Display.html?id=72442
To quote poster​:
Latest mingw-w64 64 bit + gcc >= 4.6.2 fails due to differences in setjmp
definition. (32 bit is OK) (t/exit.t fails a couple of tests with access
violation faults)

Perl Info

Flags:
    category=library
    severity=medium
    module=threads

Site configuration information for perl 5.10.1:

Configured by rurban at Sat Aug 28 20:14:06 CEST 2010.

Summary of my perl5 (revision 5 version 10 subversion 1) configuration:

  Platform:
    osname=cygwin, osvers=1.7.5(0.22553),
archname=i686-cygwin-thread-multi-64int
    uname='cygwin_nt-5.1 reini 1.7.5(0.22553) 2010-04-12 19:07 i686 cygwin '
    config_args='-de -Dlibperl=cygperl5_10.dll -Dcc=gcc-4 -Dld=g++-4
-Dmksymlinks -Dusethreads -Dmad=y -Doptimize=-O3 -Accflags=-g3'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=undef, uselongdouble=undef
    usemymalloc=y, bincompat5005=undef
  Compiler:
    cc='gcc-4', ccflags ='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g3
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include',
    optimize='-O3',
    cppflags='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g3
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.3.4 20090804 (release) 1', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8,
Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='g++-4', ldflags =' -Wl,--enable-auto-import
-Wl,--export-all-symbols -Wl,--stack,8388608
-Wl,--enable-auto-image-base -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib /lib
    libs=-lgdbm -ldb -ldl -lcrypt -lgdbm_compat
    perllibs=-ldl -lcrypt
    libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=cygperl5_10.dll
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' --shared  -Wl,--enable-auto-import
-Wl,--export-all-symbols -Wl,--stack,8388608
-Wl,--enable-auto-image-base -L/usr/local/lib -fstack-protector'

Locally applied patches:
    CYG11 no-bs
    CYG12 no archlib in otherlibdirs
    CYG14 Dynaloader
    CYG15 static-Win32CORE
    CYG17 utf8-paths
    CYG21 LibList-Kid.patch
    CYG22 cygwin-1.7 hints
    CYG23 544-stat
    CYG24 build man pages
    CYG25 rebase_privlib
    Module-Build-0.36_13
    Bug#55162 CYG18 File::Spec::case_tolerant performance
    disable ExtUtils::MakeMaker::Coverage in Sys-Syslog


@INC for perl 5.10.1:
    /usr/lib/perl5/5.10/i686-cygwin
    /usr/lib/perl5/5.10
    /usr/lib/perl5/site_perl/5.10/i686-cygwin
    /usr/lib/perl5/site_perl/5.10
    /usr/lib/perl5/vendor_perl/5.10/i686-cygwin
    /usr/lib/perl5/vendor_perl/5.10
    /usr/lib/perl5/vendor_perl/5.10
    /usr/lib/perl5/site_perl/5.8
    /usr/lib/perl5/vendor_perl/5.8
    .


Environment for perl 5.10.1:
    CYGWIN=nodosfilewarning
    HOME=/home/heddenj
    LANG=C
    LANGUAGE=C
    LC_ALL=C
    LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
    LOGDIR (unset)
    PATH=/home/heddenj/bin:/usr/local/src/perl/bin:/usr/local/bin:/usr/bin:/c/Progra~1/Java/jre6/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/Program
Files/ATI Technologies/ATI.ACE/Core-Static:/c/Program
Files/TortoiseSVN/bin:/c/PYTHON27:/c/Program Files/MySQL/MySQL Server
5.5/bin:/c/WINDOWS/system32/WindowsPowerShell/v1.0:.
    PERLIO=perlio
    PERL_BADLANG (unset)
    SHELL (unset)

@p5pRT
Copy link
Author

p5pRT commented Nov 28, 2011

From @jdhedden

threads.patch
diff -ruNw threads-1.85/threads.xs threads-1.85-copy/threads.xs
--- threads-1.85/threads.xs	2011-09-03 04:52:44.000000000 +0100
+++ threads-1.85-copy/threads.xs	2011-11-15 16:16:48.615200000 +0000
@@ -14,6 +14,9 @@
 #  if defined(USE_NO_MINGW_SETJMP_TWO_ARGS) || (!defined(__BORLANDC__) && !defined(__MINGW64__))
 #    define setjmp(x) _setjmp(x)
 #  endif
+#  if defined(__MINGW64__)
+#    define setjmp(x) _setjmpex((x), mingw_getsp())
+#  endif
 #endif
 #ifdef HAS_PPPORT_H
 #  define NEED_PL_signals

@p5pRT
Copy link
Author

p5pRT commented Dec 3, 2011

From @cpansprout

On Mon Nov 28 06​:11​:55 2011, jdhedden@​cpan.org wrote​:

This is a bug report for perl from jdhedden@​cpan.org,
generated with the help of perlbug 1.39 running under perl 5.10.1.

-----------------------------------------------------------------
[Please describe your issue here]

The attached patch was submitted by mdootson@​cpan.org for
threads bug # 72442​:
https://rt.cpan.org/Ticket/Display.html?id=72442
To quote poster​:
Latest mingw-w64 64 bit + gcc >= 4.6.2 fails due to differences in
setjmp
definition. (32 bit is OK) (t/exit.t fails a couple of tests with
access
violation faults)

Thank you. Applied as 04e1a75.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Dec 3, 2011

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Dec 3, 2011

@cpansprout - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant