pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/crafty Don't segfault on failing shmget because ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4152dde2c824
branches:  trunk
changeset: 562628:4152dde2c824
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Mon Aug 03 13:18:37 2009 +0000

description:
Don't segfault on failing shmget because the print routine tries to
access the shared memory segment. Bump revision.

diffstat:

 games/crafty/Makefile         |   4 ++--
 games/crafty/distinfo         |   4 ++--
 games/crafty/patches/patch-ad |  34 ++++++++++++++++++++++++++++++----
 3 files changed, 34 insertions(+), 8 deletions(-)

diffs (70 lines):

diff -r f4efeaac3d35 -r 4152dde2c824 games/crafty/Makefile
--- a/games/crafty/Makefile     Mon Aug 03 13:12:51 2009 +0000
+++ b/games/crafty/Makefile     Mon Aug 03 13:18:37 2009 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.43 2008/08/17 21:00:20 dholland Exp $
+# $NetBSD: Makefile,v 1.44 2009/08/03 13:18:37 joerg Exp $
 
 DISTNAME=              crafty-22.1
-PKGREVISION=           1
+PKGREVISION=           2
 CATEGORIES=            games
 MASTER_SITES=          ftp://ftp.cis.uab.edu/pub/hyatt/source/ \
                        http://www.craftychess.com/
diff -r f4efeaac3d35 -r 4152dde2c824 games/crafty/distinfo
--- a/games/crafty/distinfo     Mon Aug 03 13:12:51 2009 +0000
+++ b/games/crafty/distinfo     Mon Aug 03 13:18:37 2009 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.14 2008/08/17 21:00:20 dholland Exp $
+$NetBSD: distinfo,v 1.15 2009/08/03 13:18:37 joerg Exp $
 
 SHA1 (crafty-22.1.zip) = 4ed19f5c676035b899d82cd254eee3d391cbabbf
 RMD160 (crafty-22.1.zip) = 963ec8110617b3d1273953d03ddb974019ec26a9
@@ -6,4 +6,4 @@
 SHA1 (patch-aa) = 8efbb76aa23b3972c05dd41cde6b2c5ec8dc49b9
 SHA1 (patch-ab) = 2b926a2ebd8f9ecf125d9f62c6d5f751a52d41a7
 SHA1 (patch-ac) = 5ea68aa6ef3188ceeaf823be853e6f8c81e320df
-SHA1 (patch-ad) = 8fff57e2a0df5c81b0c783f5e04b340dcd5b630a
+SHA1 (patch-ad) = d52e3f523bd8a757095de927ebf28c2cfba7b333
diff -r f4efeaac3d35 -r 4152dde2c824 games/crafty/patches/patch-ad
--- a/games/crafty/patches/patch-ad     Mon Aug 03 13:12:51 2009 +0000
+++ b/games/crafty/patches/patch-ad     Mon Aug 03 13:18:37 2009 +0000
@@ -1,8 +1,34 @@
-$NetBSD: patch-ad,v 1.3 2008/08/17 21:00:20 dholland Exp $
+$NetBSD: patch-ad,v 1.4 2009/08/03 13:18:37 joerg Exp $
 
---- utility.c.orig     2008-04-15 18:41:49.000000000 -0400
-+++ utility.c  2008-08-17 16:41:20.000000000 -0400
-@@ -2788,6 +2788,15 @@
+--- utility.c.orig     2008-04-16 00:41:49.000000000 +0200
++++ utility.c
+@@ -388,8 +388,10 @@ void ClearHashTableScores(void)
+  */
+ void CraftyExit(int exit_type)
+ {
+-  shared->abort_search = 1;
+-  shared->quit = 1;
++  if (shared) {
++     shared->abort_search = 1;
++     shared->quit = 1;
++  }
+   exit(exit_type);
+ }
+ 
+@@ -1541,10 +1543,10 @@ void Print(int vb, char *fmt, ...)
+   va_list ap;
+ 
+   va_start(ap, fmt);
+-  if (vb & shared->display_options)
++  if (shared == NULL || (vb & shared->display_options))
+     vprintf(fmt, ap);
+   fflush(stdout);
+-  if (shared->time_limit > 99 || shared->tc_time_remaining > 6000 || vb == 4095) {
++  if (vb == 4095 || shared->time_limit > 99 || shared->tc_time_remaining > 6000) {
+     va_start(ap, fmt);
+     if (log_file)
+       vfprintf(log_file, fmt, ap);
+@@ -2788,6 +2790,15 @@ void *SharedMalloc(size_t size, int tid)
  #if defined(UNIX)
    int shmid;
    void *shared;



Home | Main Index | Thread Index | Old Index