In perl.git, the branch maint-5.20 has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/b642189dd1abd6d2121edab75b4160de94e5a715?hp=df9fea4d13b78f89de48bb8a97ae6e6b864fa9ad>

- Log -----------------------------------------------------------------
commit b642189dd1abd6d2121edab75b4160de94e5a715
Author: Ricardo Signes <[email protected]>
Date:   Thu May 21 18:34:45 2015 -0400

    add new address for kmx
    
    (cherry picked from commit 6378109479f5b474e8205c8478f484b209078772)

M       Porting/checkAUTHORS.pl

commit 31ab3c2c5bf8d1ed96acefc05faf21fc8a18ca83
Author: KMX <[email protected]>
Date:   Thu May 14 09:20:08 2015 +0200

    handle existing mkstemp() in mingw-w64-v4
    
    (cherry picked from commit f33b2f585292653a3c50ea39cbdab734c3473fcb)

M       win32/config_H.gc
M       win32/win32.c
M       win32/win32.h

commit 775d07fe1f24ba72a76298bbcaa0c737c37c0246
Author: Father Chrysostomos <[email protected]>
Date:   Mon Nov 10 18:22:43 2014 -0800

    Don’t treat setpgrp($nonzero) as setpgrp(1)
    
    This was broken inadvertently by 92f2ac5f (5.15.3).
    
    I really have no idea how to test this.  I only confirmed the bug and
    its fix via a temporary warn statement in pp_setpgrp (obviously not
    included in this commit).
    
    (cherry picked from commit bae8cfc6926f9b04d8adac6a9ee6d563cc18263f)

M       pp_sys.c

commit ab4bc882871ec70a332518a556f2ad8bdccfce25
Author: Lukas Mai <[email protected]>
Date:   Thu Feb 12 13:29:29 2015 +0100

    don't fatalize warnings during unwinding (#123398)
    
    (cherry picked from commit 46b27d2f2c37f40dde845f9b4743975c69f2cc27)

M       util.c

commit b9d0b7b01399df7c7155d1ac249e0ec52a2f0cc0
Author: Father Chrysostomos <[email protected]>
Date:   Mon Aug 17 08:13:52 2015 +0100

    [perl #123711] Fix crash with 0-5x-l{0}
    
    perl-5.8.0-117-g6f33ba7, which added the XTERMORDORDOR hack, did not
    change the leftbracket code to treat XTERMORDORDOR the same way as
    XTERM, so -l {0} and getc {0} (among other ops) were treating {...} as
    a block, rather than an anonymous hash.  This was not, however, being
    turned into a real block with enter/leave ops to protect the stack,
    so the nextstate op was corrupting the stack and possibly freeing mor-
    tals in use.
    
    This commit makes the leftbracket code check for XTERMORDORDOR and
    treat it like XTERM, so that -l {0} once more creates an anonymous
    hash.  There is really no way to get to that hash, though, so all I
    can test for is the crash.
    
    (cherry picked from commit 83a85f49e265a458a481a9dc402dd3bdd30ae457)

M       t/base/lex.t
M       toke.c
-----------------------------------------------------------------------

Summary of changes:
 Porting/checkAUTHORS.pl | 2 ++
 pp_sys.c                | 2 +-
 t/base/lex.t            | 3 +++
 toke.c                  | 1 +
 util.c                  | 5 ++++-
 win32/config_H.gc       | 4 +++-
 win32/win32.c           | 2 ++
 win32/win32.h           | 2 ++
 8 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/Porting/checkAUTHORS.pl b/Porting/checkAUTHORS.pl
index 431ddb9..39eb0d5 100755
--- a/Porting/checkAUTHORS.pl
+++ b/Porting/checkAUTHORS.pl
@@ -691,6 +691,8 @@ keith.s.thompson\100gmail.com           kst\100mib.org
 ken\100mathforum.org                    kenahoo\100gmail.com
 +                                       ken.williams\100thomsonreuters.com
 kentfredric\100gmail.com                kentnl\100cpan.org
+kmx\100volny.cz                         kmx\100volny.cz
++                                       kmx\100cpan.org
 kroepke\100dolphin-services.de          kay\100dolphin-services.de
 kst\100mib.org                          kst\100cts.com
 +                                       kst\100SDSC.EDU
diff --git a/pp_sys.c b/pp_sys.c
index 9de4dff..967b1dd 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -4324,7 +4324,7 @@ PP(pp_setpgrp)
     Pid_t pgrp;
     Pid_t pid;
     pgrp = MAXARG == 2 && (TOPs||POPs) ? POPi : 0;
-    if (MAXARG > 0) pid = TOPs && TOPi;
+    if (MAXARG > 0) pid = TOPs ? TOPi : 0;
     else {
        pid = 0;
        XPUSHi(-1);
diff --git a/t/base/lex.t b/t/base/lex.t
index 01ab208..3c612ec 100644
--- a/t/base/lex.t
+++ b/t/base/lex.t
@@ -434,3 +434,6 @@ print "ok $test - y <comment> <newline> ...\n"; $test++;
 print "not " unless (time
                      =>) eq time=>;
 print "ok $test - => quotes keywords across lines\n"; $test++;
+
+# Used to crash [perl #123711]
+0-5x-l{0};
diff --git a/toke.c b/toke.c
index 899712b..51408a1 100644
--- a/toke.c
+++ b/toke.c
@@ -6107,6 +6107,7 @@ Perl_yylex(pTHX)
        }
        switch (PL_expect) {
        case XTERM:
+       case XTERMORDORDOR:
            PL_lex_brackstack[PL_lex_brackets++] = XOPERATOR;
            PL_lex_allbrackets++;
            OPERATOR(HASHBRACK);
diff --git a/util.c b/util.c
index 5a3c077..fede576 100644
--- a/util.c
+++ b/util.c
@@ -1877,7 +1877,10 @@ Perl_vwarner(pTHX_ U32  err, const char* pat, va_list* 
args)
 {
     dVAR;
     PERL_ARGS_ASSERT_VWARNER;
-    if (PL_warnhook == PERL_WARNHOOK_FATAL || ckDEAD(err)) {
+    if (
+        (PL_warnhook == PERL_WARNHOOK_FATAL || ckDEAD(err)) &&
+        !(PL_in_eval & EVAL_KEEPERR)
+    ) {
        SV * const msv = vmess(pat, args);
 
        invoke_exception_hook(msv, FALSE);
diff --git a/win32/config_H.gc b/win32/config_H.gc
index da310af..d64fd9f 100644
--- a/win32/config_H.gc
+++ b/win32/config_H.gc
@@ -1973,7 +1973,9 @@
  *     available to exclusively create and open a uniquely named
  *     temporary file.
  */
-/*#define HAS_MKSTEMP          / **/
+#if __MINGW64_VERSION_MAJOR >= 4
+#define HAS_MKSTEMP
+#endif
 
 /* HAS_MMAP:
  *     This symbol, if defined, indicates that the mmap system call is
diff --git a/win32/win32.c b/win32/win32.c
index 5a112ef..dfc57ce 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -1122,6 +1122,7 @@ chown(const char *path, uid_t owner, gid_t group)
  * XXX this needs strengthening  (for PerlIO)
  *   -- BKS, 11-11-200
 */
+#if !defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 4
 int mkstemp(const char *path)
 {
     dTHX;
@@ -1142,6 +1143,7 @@ retry:
        goto retry;
     return fd;
 }
+#endif
 
 static long
 find_pid(pTHX_ int pid)
diff --git a/win32/win32.h b/win32/win32.h
index 735c450..13db661 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -326,8 +326,10 @@ extern  void       *sbrk(ptrdiff_t need);
 #endif
 extern char *  getlogin(void);
 extern int     chown(const char *p, uid_t o, gid_t g);
+#if !defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 4
 extern  int    mkstemp(const char *path);
 #endif
+#endif
 
 #undef  Stat
 #define  Stat          win32_stat

--
Perl5 Master Repository

Reply via email to