Commit b7caba8a authored by bescoto's avatar bescoto

Fixed segfault bug on openbsd+sparc systems


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@263 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 06c03d24
...@@ -5,6 +5,9 @@ If get a socket error from trying to create a socket whose name is too ...@@ -5,6 +5,9 @@ If get a socket error from trying to create a socket whose name is too
long, just skip file instead of exiting with error (original bug long, just skip file instead of exiting with error (original bug
report by Ivo De Decker). report by Ivo De Decker).
Fixed seg fault bug reported by a couple sparc+openbsd users. Thanks
to Dave Steinberg for giving me an account on his system for testing.
New in v0.10.1 (2002/09/16) New in v0.10.1 (2002/09/16)
......
...@@ -70,7 +70,7 @@ static PyObject * ...@@ -70,7 +70,7 @@ static PyObject *
_librsync_sigmaker_cycle(_librsync_SigMakerObject *self, PyObject *args) _librsync_sigmaker_cycle(_librsync_SigMakerObject *self, PyObject *args)
{ {
char *inbuf, outbuf[RS_JOB_BLOCKSIZE]; char *inbuf, outbuf[RS_JOB_BLOCKSIZE];
long inbuf_length; int inbuf_length;
rs_buffers_t buf; rs_buffers_t buf;
rs_result result; rs_result result;
...@@ -91,7 +91,7 @@ _librsync_sigmaker_cycle(_librsync_SigMakerObject *self, PyObject *args) ...@@ -91,7 +91,7 @@ _librsync_sigmaker_cycle(_librsync_SigMakerObject *self, PyObject *args)
} }
return Py_BuildValue("(ils#)", (result == RS_DONE), return Py_BuildValue("(ils#)", (result == RS_DONE),
inbuf_length - (long)buf.avail_in, (long)inbuf_length - (long)buf.avail_in,
outbuf, RS_JOB_BLOCKSIZE - (long)buf.avail_out); outbuf, RS_JOB_BLOCKSIZE - (long)buf.avail_out);
} }
...@@ -168,7 +168,7 @@ _librsync_new_deltamaker(PyObject* self, PyObject* args) ...@@ -168,7 +168,7 @@ _librsync_new_deltamaker(PyObject* self, PyObject* args)
{ {
_librsync_DeltaMakerObject* dm; _librsync_DeltaMakerObject* dm;
char *sig_string, outbuf[RS_JOB_BLOCKSIZE]; char *sig_string, outbuf[RS_JOB_BLOCKSIZE];
long sig_length; int sig_length;
rs_job_t *sig_loader; rs_job_t *sig_loader;
rs_signature_t *sig_ptr; rs_signature_t *sig_ptr;
rs_buffers_t buf; rs_buffers_t buf;
...@@ -224,7 +224,7 @@ static PyObject * ...@@ -224,7 +224,7 @@ static PyObject *
_librsync_deltamaker_cycle(_librsync_DeltaMakerObject *self, PyObject *args) _librsync_deltamaker_cycle(_librsync_DeltaMakerObject *self, PyObject *args)
{ {
char *inbuf, outbuf[RS_JOB_BLOCKSIZE]; char *inbuf, outbuf[RS_JOB_BLOCKSIZE];
long inbuf_length; int inbuf_length;
rs_buffers_t buf; rs_buffers_t buf;
rs_result result; rs_result result;
...@@ -244,7 +244,7 @@ _librsync_deltamaker_cycle(_librsync_DeltaMakerObject *self, PyObject *args) ...@@ -244,7 +244,7 @@ _librsync_deltamaker_cycle(_librsync_DeltaMakerObject *self, PyObject *args)
} }
return Py_BuildValue("(ils#)", (result == RS_DONE), return Py_BuildValue("(ils#)", (result == RS_DONE),
inbuf_length - (long)buf.avail_in, (long)inbuf_length - (long)buf.avail_in,
outbuf, RS_JOB_BLOCKSIZE - (long)buf.avail_out); outbuf, RS_JOB_BLOCKSIZE - (long)buf.avail_out);
} }
...@@ -360,7 +360,7 @@ static PyObject * ...@@ -360,7 +360,7 @@ static PyObject *
_librsync_patchmaker_cycle(_librsync_PatchMakerObject *self, PyObject *args) _librsync_patchmaker_cycle(_librsync_PatchMakerObject *self, PyObject *args)
{ {
char *inbuf, outbuf[RS_JOB_BLOCKSIZE]; char *inbuf, outbuf[RS_JOB_BLOCKSIZE];
long inbuf_length; int inbuf_length;
rs_buffers_t buf; rs_buffers_t buf;
rs_result result; rs_result result;
...@@ -380,7 +380,7 @@ _librsync_patchmaker_cycle(_librsync_PatchMakerObject *self, PyObject *args) ...@@ -380,7 +380,7 @@ _librsync_patchmaker_cycle(_librsync_PatchMakerObject *self, PyObject *args)
} }
return Py_BuildValue("(ils#)", (result == RS_DONE), return Py_BuildValue("(ils#)", (result == RS_DONE),
inbuf_length - (long)buf.avail_in, (long)inbuf_length - (long)buf.avail_in,
outbuf, RS_JOB_BLOCKSIZE - (long)buf.avail_out); outbuf, RS_JOB_BLOCKSIZE - (long)buf.avail_out);
} }
......
...@@ -13,4 +13,4 @@ if len(sys.argv) > 1: os.chdir(sys.argv[1]) ...@@ -13,4 +13,4 @@ if len(sys.argv) > 1: os.chdir(sys.argv[1])
#PipeConnection(sys.stdin, sys.stdout).Server() #PipeConnection(sys.stdin, sys.stdout).Server()
#os.system("/home/ben/prog/python/rdiff-backup/rdiff-backup --server") #os.system("/home/ben/prog/python/rdiff-backup/rdiff-backup --server")
os.system("/home/ben/prog/python/rdiff-backup/testing/server.py /home/ben/prog/python/rdiff-backup/src") os.system("/home/ben/prog/python/rdiff-backup/testing/server.py /home/ben/prog/python/rdiff-backup/rdiff_backup")
...@@ -12,5 +12,5 @@ import os, sys ...@@ -12,5 +12,5 @@ import os, sys
if len(sys.argv) > 1: os.chdir(sys.argv[1]) if len(sys.argv) > 1: os.chdir(sys.argv[1])
#PipeConnection(sys.stdin, sys.stdout).Server() #PipeConnection(sys.stdin, sys.stdout).Server()
os.system("/home/ben/prog/python/rdiff-backup/rdiff-backup --server") os.system("/home/ben/prog/rdiff-backup/rdiff-backup --server")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment