pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/benchmarks/bytebench Correct execl() so that the argum...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/76ba6c2c94e6
branches:  trunk
changeset: 500802:76ba6c2c94e6
user:      ben <ben%pkgsrc.org@localhost>
date:      Thu Oct 13 03:31:06 2005 +0000

description:
Correct execl() so that the argument list is NULL terminated.
Terminating with 0 worked under NetBSD 2.0.2, but it fails with
EFAULT under NetBSD/amd64 3.0_BETA.

diffstat:

 benchmarks/bytebench/distinfo         |   4 ++--
 benchmarks/bytebench/patches/patch-af |  19 ++++++++++++-------
 2 files changed, 14 insertions(+), 9 deletions(-)

diffs (60 lines):

diff -r f9dd52a91b75 -r 76ba6c2c94e6 benchmarks/bytebench/distinfo
--- a/benchmarks/bytebench/distinfo     Thu Oct 13 00:23:53 2005 +0000
+++ b/benchmarks/bytebench/distinfo     Thu Oct 13 03:31:06 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2005/02/22 21:16:36 agc Exp $
+$NetBSD: distinfo,v 1.8 2005/10/13 03:31:06 ben Exp $
 
 SHA1 (unixbench-4.1.0.tgz) = 0a43d9cf08869c0f81bde4647be6bcf76c064248
 RMD160 (unixbench-4.1.0.tgz) = 182e8a35574df0cd7984662bf99d47a7e24e7e03
@@ -8,4 +8,4 @@
 SHA1 (patch-ac) = ebfb09da84c96f8c6f48293c65a74dcf8a43cff5
 SHA1 (patch-ad) = 3a1b788d9fa51fc168d59d8c87b1f476df2d5f41
 SHA1 (patch-ae) = fbbce3deed7f0421034c1d57b66b1967ad8bddf1
-SHA1 (patch-af) = 022a7e668dfca41e2a6f3a825f5bd17af29dc270
+SHA1 (patch-af) = 725a82ecb5f15ec47dda39d53a16027a0e4a7efd
diff -r f9dd52a91b75 -r 76ba6c2c94e6 benchmarks/bytebench/patches/patch-af
--- a/benchmarks/bytebench/patches/patch-af     Thu Oct 13 00:23:53 2005 +0000
+++ b/benchmarks/bytebench/patches/patch-af     Thu Oct 13 03:31:06 2005 +0000
@@ -1,9 +1,7 @@
-$NetBSD: patch-af,v 1.2 2003/04/26 05:18:00 simonb Exp $
+$NetBSD: patch-af,v 1.3 2005/10/13 03:31:06 ben Exp $
 
-Fix LP64 problem.
-
---- src/execl.c.orig   1999-07-29 07:46:58.000000000 +1000
-+++ src/execl.c        2003-04-26 15:10:39.000000000 +1000
+--- src/execl.c.orig   1999-07-28 14:46:58.000000000 -0700
++++ src/execl.c
 @@ -22,6 +22,7 @@
   */
  char SCCSid[] = "@(#) @(#)execl.c:3.3 -- 5/15/91 19:30:19";
@@ -12,7 +10,7 @@
  #include <stdio.h>
  #include <sys/types.h>
  
-@@ -45,8 +46,9 @@
+@@ -45,8 +46,9 @@ char *argv[];
        char *ptr; 
        char *fullpath;
        int     duration;
@@ -23,7 +21,7 @@
  
  #ifdef DEBUG
        int count;
-@@ -77,12 +79,13 @@
+@@ -77,18 +79,19 @@ char       *argv[];
                duration = atoi(argv[2]);
                dur_str = argv[2];
                iter = (unsigned long)atoi(argv[3]); /* where are we now ? */
@@ -39,3 +37,10 @@
        time(&this_time);
        if (this_time - start_time >= duration) { /* time has run out */
                fprintf(stderr, "%lu loops\n", iter);
+               exit(0);
+               }
+-      execl(fullpath, fullpath, "0", dur_str, count_str, start_str, 0);
++      execl(fullpath, fullpath, "0", dur_str, count_str, start_str, NULL);
+       printf("Exec failed at iteration %lu\n", iter);
+       perror("Reason");
+       exit(1);



Home | Main Index | Thread Index | Old Index