Re: OpenBSD 3.6 sparc64 stable crash

2005-05-31 Thread Derek Price
Alexander Taler wrote:

>+2005-05-31  Alexander Taler <[EMAIL PROTECTED]>
>+
>+  * rcscmds.c: Change type of call_diff_argc_allocated from int to
>+  size_t, to match the prototype of run_add_arg_p().  This fixes a
>+  bus error in OpenBSD 3.6 sparc64.
>  
>

Makes sense.  int & size_t probably have different sizes on this 64 bit
platform, which could explain the bus error.  Thanks for the patch! 
I've committed it on stable and feature.

Regards,

Derek




___
Bug-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-cvs


Re: OpenBSD 3.6 sparc64 stable crash

2005-05-31 Thread Alexander Taler

[resend of message, unsigned because the gpg signing corrupted
the patch.]

  Alex> Core was generated by `cvs'.  Program terminated with signal 10, Bus
  Alex> error.
  Alex> #0 0x0014f148 in run_add_arg_p (iargc=0x7a8000,
  Alex> iarg_allocated=0x7a8004, iargv=0x7a7ff8, s=0x293838 "diff") at
  Alex> /home/cvstest/cvs-nightly-cvs1-11-x-branch/src/run.c:81 81 if (*iargc >=
  Alex> *iarg_allocated)

  Derek> Can you be a little more specific about the problem?

Not really, but I can provide a patch which fixes it.  It
successfully passed make check, and even includes a ChangeLog.

Alex


Index: src/ChangeLog
===
RCS file: /cvs/ccvs/src/ChangeLog,v
retrieving revision 1.2336.2.377
diff -u -u -r1.2336.2.377 ChangeLog
--- src/ChangeLog   28 May 2005 06:53:24 -  1.2336.2.377
+++ src/ChangeLog   31 May 2005 23:20:07 -
@@ -1,3 +1,9 @@
+2005-05-31  Alexander Taler <[EMAIL PROTECTED]>
+
+   * rcscmds.c: Change type of call_diff_argc_allocated from int to
+   size_t, to match the prototype of run_add_arg_p().  This fixes a
+   bus error in OpenBSD 3.6 sparc64.
+
 2005-05-27  Conrad T. Pino  <[EMAIL PROTECTED]>
 
* cvs.h: Replace "run_arg" function with "#define run_arg run_add_arg",
Index: src/rcscmds.c
===
RCS file: /cvs/ccvs/src/rcscmds.c,v
retrieving revision 1.52.4.6
diff -u -u -r1.52.4.6 rcscmds.c
--- src/rcscmds.c   27 May 2005 16:25:11 -  1.52.4.6
+++ src/rcscmds.c   31 May 2005 23:20:07 -
@@ -76,7 +76,7 @@
 
 static char **call_diff_argv;
 static int call_diff_argc;
-static int call_diff_argc_allocated;
+static size_t call_diff_argc_allocated;
 
 static void call_diff_add_arg PROTO ((const char *));
 static void call_diff_setup PROTO ((const char *prog,


-- 
https://savannah.gnu.org/projects/libcvs-specAccess CVS through a library.
PGP:  ID: 0x23DC453B  FPR: 42D0 66C2 9FF8 553A 373A  B819 4C34 93BA 23DC 453B
convince your customer that pserver access to a CVS server is, if not
*actually* the work of the devil, then pretty similar -- Derek Price


___
Bug-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-cvs


Re: OpenBSD 3.6 sparc64 stable crash

2005-05-31 Thread Alexander Taler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tue, 31 May 2005 19:26:43 EDT
Tue, 31 May 2005 19:26:30 EDT
  Alex> Core was generated by `cvs'.  Program terminated with signal 10, Bus
  Alex> error.
  Alex> #0 0x0014f148 in run_add_arg_p (iargc=0x7a8000,
  Alex> iarg_allocated=0x7a8004, iargv=0x7a7ff8, s=0x293838 "diff") at
  Alex> /home/cvstest/cvs-nightly-cvs1-11-x-branch/src/run.c:81 81 if (*iargc >=
  Alex> *iarg_allocated)

  Derek> Can you be a little more specific about the problem?

Not really, but I can provide a patch which fixes it.  It
successfully passed make check, and even includes a ChangeLog.

Alex


Index: src/ChangeLog
===
RCS file: /cvs/ccvs/src/ChangeLog,v
retrieving revision 1.2336.2.377
diff -u -u -r1.2336.2.377 ChangeLog
- --- src/ChangeLog 28 May 2005 06:53:24 -  1.2336.2.377
+++ src/ChangeLog   31 May 2005 23:20:07 -
@@ -1,3 +1,9 @@
+2005-05-31  Alexander Taler <[EMAIL PROTECTED]>
+
+   * rcscmds.c: Change type of call_diff_argc_allocated from int to
+   size_t, to match the prototype of run_add_arg_p().  This fixes a
+   bus error in OpenBSD 3.6 sparc64.
+
 2005-05-27  Conrad T. Pino  <[EMAIL PROTECTED]>
 
* cvs.h: Replace "run_arg" function with "#define run_arg run_add_arg",
Index: src/rcscmds.c
===
RCS file: /cvs/ccvs/src/rcscmds.c,v
retrieving revision 1.52.4.6
diff -u -u -r1.52.4.6 rcscmds.c
- --- src/rcscmds.c 27 May 2005 16:25:11 -  1.52.4.6
+++ src/rcscmds.c   31 May 2005 23:20:07 -
@@ -76,7 +76,7 @@
 
 static char **call_diff_argv;
 static int call_diff_argc;
- -static int call_diff_argc_allocated;
+static size_t call_diff_argc_allocated;
 
 static void call_diff_add_arg PROTO ((const char *));
 static void call_diff_setup PROTO ((const char *prog,


- -- 
https://savannah.gnu.org/projects/libcvs-specAccess CVS through a library.
PGP:  ID: 0x23DC453B  FPR: 42D0 66C2 9FF8 553A 373A  B819 4C34 93BA 23DC 453B
convince your customer that pserver access to a CVS server is, if not
*actually* the work of the devil, then pretty similar -- Derek Price
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2 (OpenBSD)
Comment: Processed by Mailcrypt 3.5.8 

iD8DBQFCnPK6TDSTuiPcRTsRArPjAKCbPVx1Nicany0tWKIkJCCkOwtl4QCeI8A0
54UcXlN2ODjiAntxg7BhQtM=
=TG3C
-END PGP SIGNATURE-


___
Bug-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-cvs


Re: OpenBSD 3.6 sparc64 stable crash

2005-05-30 Thread Derek Price
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Alexander Taler wrote:

> Core was generated by `cvs'.
> Program terminated with signal 10, Bus error.
> #0 0x0014f148 in run_add_arg_p (iargc=0x7a8000,
> iarg_allocated=0x7a8004, iargv=0x7a7ff8, s=0x293838 "diff")
> at /home/cvstest/cvs-nightly-cvs1-11-x-branch/src/run.c:81
> 81 if (*iargc >= *iarg_allocated)


Why would the dereference of an int * or a size_t * or the comparison of
the resulting int and size_t cause a bus error?  Your stack  trace makes
it look like there are valid addresses in the inputs (iargc=0x7a8000,
iarg_allocated=0x7a8004) and this same code is compiling and passing
test on 7 or more other platforms, including NetBSD 1.6.1 and BSD/OS
though, as far as I know, none of the platforms are 64-bit.

Can you be a little more specific about the problem?  Perhaps loading
the core back into your debugger and trying to print some values (e.g.
iargc, *iargc, iarg_allocated, *iarg_allocated), might provide more clues.

Regards,

Derek
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCmzi/LD1OTBfyMaQRAsXyAJ9yaDIHvIBY5njvFV6f3dBFbDvxQQCgpunU
tJnHHSFgVjHZyTXRDIf/SEk=
=vLzc
-END PGP SIGNATURE-




___
Bug-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-cvs