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
signature.asc
Description: Digital signature
__ distcc mailing list http://distcc.samba.org/ To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/distcc