On Fri, Jan 16, 2026 at 8:45 AM <[email protected]> wrote:
>
> Author: brane
> Date: Thu Jan 15 23:45:34 2026
> New Revision: 1931334
>
> Log:
> Remove another unchecked narrowing cast, this time in the implementation
> of the adler32 checksum. Make sure we consume all the data, no matter
> how improbably large it may be.
>
>
> * build/ac-macros/zlib.m4
>   (SVN_LIB_Z): Check if we're using a version of zlib that provides the
>    function adler32_z(), which uses size_t instead of unsigned int for
>    the length of the input data.
>
> * build.conf
>   (adler32-test): Define a new unit test program.
>
> * subversion/libsvn_subr/adler32.c: Include svn_private_config.h.
>   (svn__adler32_impl, svn__adler32_fn, svn__adler32_size_t,
>    SVN__ADLER32_SIZE_MAX): New type and macros to use adler32_z() if
>    available and adler32() if not, without too much clutter elsewhere.
>   (SVN__ADLER_MOD_BASE): Renamed from ADLER_MOD_BASE and made unsigned.
>   (svn__adler32): Consume huge input data sets in SVN__ADLER32_SIZE_MAX
>    -sized chunks. Shortcut the result if someone fed us zero-length data.
>
> * subversion/tests/libsvn_subr/adler32-test.c: New file with tests
>    that compare our adler32 implementation with the one in zlib.
>
> Added:
>    subversion/trunk/subversion/tests/libsvn_subr/adler32-test.c   (contents, 
> props changed)
> Modified:
>    subversion/trunk/build.conf
>    subversion/trunk/build/ac-macros/zlib.m4
>    subversion/trunk/subversion/libsvn_subr/adler32.c
>
> Modified: subversion/trunk/build.conf
> ==============================================================================
> --- subversion/trunk/build.conf Thu Jan 15 22:21:35 2026        (r1931333)
> +++ subversion/trunk/build.conf Thu Jan 15 23:45:34 2026        (r1931334)
> @@ -932,6 +932,14 @@ libs = libsvn_test libsvn_wc libsvn_repo
>  # 
> ----------------------------------------------------------------------------
>  # Tests for libsvn_subr
>
> +[adler32-test]
> +description = Test our implementation of the adler32 checksum.
> +type = exe
> +path = subversion/tests/libsvn_subr
> +sources = adler32-test.c
> +install = test
> +libs = libsvn_test libsvn_subr apr
> +
>  [auth-test]
>  description = Test platform-specific auth provider access
>  type = exe

After r1931334, link of adler32-test failing....

[[[
/usr/bin/ld: 
CMakeFiles/adler32-test.dir/subversion/tests/libsvn_subr/adler32-test.c.o:
undefined reference to symbol 'adler32'
/usr/bin/ld: /lib/x86_64-linux-gnu/libz.so.1: error adding symbols:
DSO missing from command line
collect2: error: ld returned 1 exit status
]]]

It seems to be due to missing zlib for the libs for [adler32-test] in
build.conf.

[[[
diff --git a/build.conf b/build.conf
index ca6e01d64..d53952b24 100644
--- a/build.conf
+++ b/build.conf
@@ -938,7 +938,7 @@ type = exe
 path = subversion/tests/libsvn_subr
 sources = adler32-test.c
 install = test
-libs = libsvn_test libsvn_subr apr
+libs = libsvn_test libsvn_subr apr zlib

 [auth-test]
 description = Test platform-specific auth provider access
]]]


-- 
Jun Omae <[email protected]> (大前 潤)

Reply via email to