[distcc] distcc 2.14 bugs in lzo code(?)

Martin Pool mbp at sourcefrog.net
Tue Jul 6 08:29:59 GMT 2004


I think I worked out the problem at last.  It is a bit hard to
reproduce and the crash occurs somewhat after the bug.  Can you see if
this fixes it?


--- orig/src/compress.c
+++ mod/src/compress.c
@@ -301,12 +301,10 @@
 
         goto out;
     } else if (lzo_ret == LZO_E_OUTPUT_OVERRUN) {
-        out_size *= 2;
-        rs_trace("LZO_E_OUTPUT_OVERRUN, trying again with %lu byte buffer",
-                 (unsigned long) out_size);
         if (is_mmapped) {
             if (munmap(out_buf, out_size) == -1) {
-                rs_log_error("munmap (output) failed: %s", strerror(errno));
+                rs_log_error("munmap output to grow failed: %s",
+                             strerror(errno));
                 ret = EXIT_IO_ERROR;
                 goto out;
             }
@@ -315,6 +313,9 @@
             free(out_buf);
         }
         out_buf = 0;
+        out_size *= 2;
+        rs_trace("LZO_E_OUTPUT_OVERRUN, trying again with %lu byte buffer",
+                 (unsigned long) out_size);
         goto try_again_with_a_bigger_buffer;
     } else {
         rs_log_error("LZO1X1 decompression failed: %d", lzo_ret);


-- 
Martin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/distcc/attachments/20040706/10e8646f/attachment.bin


More information about the distcc mailing list