On Fri, Oct 6, 2017 at 3:22 AM, Gerald Pfeifer <ger...@pfeifer.com> wrote: > On Thu, 28 Sep 2017, Ian Lance Taylor wrote: >> This patch to libbacktrace adds support for compressed debug sections. >> 2017-09-28 Ian Lance Taylor <i...@golang.org> >> >> PR other/67165 >> * elf.c (__builtin_prefetch): Define if not __GNUC__. >> (unlikely): Define. >> (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define. >> (b_elf_chdr): Define type. >> (enum debug_section): Add ZDEBUG_xxx values. > > Since this change I am seeing the following in my night GCC build > and test logs on FreeBSD systems: > > gmake[2]: autogen: Command not found > gmake[2]: *** [Makefile:176: check] Error 127 > gmake[1]: *** [Makefile:3759: check-fixincludes] Error 2 > /scratch/tmp/gerald/GCC-HEAD/libbacktrace/ztest.c: In function 'test_large': > /scratch/tmp/gerald/GCC-HEAD/libbacktrace/ztest.c:384:41: warning: passing > argument 2 of 'uncompress' from incompatible pointer type > [-Wincompatible-pointer-types] > r = uncompress (uncompressed_buf, &uncompressed_bufsize, > ^~~~~~~~~~~~~~~~~~~~~ > In file included from /scratch/tmp/gerald/GCC-HEAD/libbacktrace/ztest.c:43:0: > /usr/include/zlib.h:1265:21: note: expected 'uLongf * {aka long unsigned int > *}' but argument is of type 'size_t * {aka unsigned int *}' > ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, > ^~~~~~~~~~ > /scratch/tmp/gerald/GCC-HEAD/libbacktrace/ztest.c: In function 'test_large': > /scratch/tmp/gerald/GCC-HEAD/libbacktrace/ztest.c:384:41: warning: passing > argument 2 of 'uncompress' from incompatible pointer type > [-Wincompatible-pointer-types] > r = uncompress (uncompressed_buf, &uncompressed_bufsize, > ^~~~~~~~~~~~~~~~~~~~~ > In file included from /scratch/tmp/gerald/GCC-HEAD/libbacktrace/ztest.c:43:0: > /usr/include/zlib.h:1265:21: note: expected 'uLongf * {aka long unsigned int > *}' but argument is of type 'size_t * {aka unsigned int *}' > ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, > ^~~~~~~~~~ > gmake[4]: *** [Makefile:306: check-DEJAGNU] Error 1 > gmake[3]: *** [Makefile:350: check-am] Error 2 > gmake[2]: *** [Makefile:904: check-recursive] Error 1 > gmake[1]: *** [Makefile:22343: check-target-libgomp] Error 2 > Fatal error 'mutex is on list' at line 272 in file > /usr/src/lib/libthr/thread/thr_mutex.c (errno = 0) > Fatal error 'mutex is on list' at line 272 in file > /usr/src/lib/libthr/thread/thr_mutex.c (errno = 0) > gmake: *** [Makefile:2286: do-check] Error 2
Thanks for the report. I committed this patch, which I hope will fix the problem. Ian 2017-10-06 Ian Lance Taylor <i...@golang.org> * ztest.c (test_large): Pass unsigned long *, not size_t *, to zlib uncompress function.
Index: ztest.c =================================================================== --- ztest.c (revision 253490) +++ ztest.c (working copy) @@ -369,6 +369,8 @@ test_large (struct backtrace_state *stat for (i = 0; i < trials; ++i) { + unsigned long uncompress_sizearg; + cid = ZLIB_CLOCK_GETTIME_ARG; if (clock_gettime (cid, &ts1) < 0) { @@ -406,7 +408,8 @@ test_large (struct backtrace_state *stat return; } - r = uncompress (uncompressed_buf, &uncompressed_bufsize, + uncompress_sizearg = uncompressed_bufsize; + r = uncompress (uncompressed_buf, &uncompress_sizearg, compressed_buf + 12, compressed_bufsize - 12); if (clock_gettime (cid, &ts2) < 0)