[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1873943 - /subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Wed, 12 Feb 2020 14:28:54 +0000

jorton_at_apache.org wrote on Wed, 12 Feb 2020 13:41 -0000:
> Author: jorton
> Date: Wed Feb 12 13:41:25 2020
> New Revision: 1873943
>
> URL: http://svn.apache.org/viewvc?rev=1873943&view=rev
> Log:
> Fix test failures seen on 32-bit architectures (Fedora Raw Hide, both
> i686 and armv7hl) when building with GCC 10 snapshots.
>
> * subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
> (get_rev_contents): Avoid signed integer overflow on platforms with
> 32-bit long.
>
> Modified:
> subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
>
> Modified: subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c?rev=1873943&r1=1873942&r2=1873943&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c (original)
> +++ subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c Wed Feb 12 13:41:25 2020
> @@ -59,7 +59,8 @@ static const char *
> get_rev_contents(svn_revnum_t rev, apr_pool_t *pool)
> {
> /* Toss in a bunch of magic numbers for spice. */
> - apr_int64_t num = ((rev * 1234353 + 4358) * 4583 + ((rev % 4) << 1)) / 42;
> + apr_int64_t rev64 = rev;
> + apr_int64_t num = ((rev64 * 1234353 + 4358) * 4583 + ((rev64 % 4) << 1)) / 42;

Should this be backported?

Cheers,

Daniel
Received on 2020-02-12 15:29:02 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.