abseil.git
6 months agoMerge version 20220623.1-1+rpi1 and 20220623.1-1+deb12u2 to produce 20220623.1-1... bookworm-staging archive/raspbian/20220623.1-1+rpi1+deb12u2 raspbian/20220623.1-1+rpi1+deb12u2
Raspbian automatic forward porter [Wed, 21 May 2025 12:44:55 +0000 (13:44 +0100)]
Merge version 20220623.1-1+rpi1 and 20220623.1-1+deb12u2 to produce 20220623.1-1+rpi1+deb12u2

7 months agoMerge abseil (20220623.1-1+deb12u2) import into refs/heads/workingbranch
Tobias Frost [Mon, 12 May 2025 15:26:59 +0000 (17:26 +0200)]
Merge abseil (20220623.1-1+deb12u2) import into refs/heads/workingbranch

7 months agoCVE-2025-0838 - Heap buffer overflow vulnerable in Abseil-cpp
Benjamin Barenblat [Mon, 12 May 2025 15:26:59 +0000 (17:26 +0200)]
CVE-2025-0838 - Heap buffer overflow vulnerable in Abseil-cpp

Origin: https://github.com/abseil/abseil-cpp/commit/5a0e2cb5e3958dd90bb8569a2766622cb74d90c1
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1098903

Backported for bookworm from upstream.
From 5a0e2cb5e3958dd90bb8569a2766622cb74d90c1 Mon Sep 17 00:00:00 2001
From: Derek Mauro <dmauro@google.com>
Date: Thu, 23 Jan 2025 06:33:43 -0800
Subject: [PATCH] Fix potential integer overflow in hash container
 create/resize

The sized constructors, reserve(), and rehash() methods of
absl::{flat,node}_hash_{set,map} did not impose an upper bound on
their size argument. As a result, it was possible for a caller to pass
a very large size that would cause an integer overflow when computing
the size of the container's backing store. Subsequent accesses to the
container might then access out-of-bounds memory.

The fix is in two parts:

1) Update max_size() to return the maximum number of items that can be
stored in the container

2) Validate the size arguments to the constructors, reserve(), and
rehash() methods, and abort the program when the argument is invalid

We've looked at uses of these containers in Google codebases like
Chrome, and determined this vulnerability is likely to be difficult to
exploit. This is primarily because container sizes are rarely
attacker-controlled.

The bug was discovered by Dmitry Vyukov <dvyukov@google.com>.

PiperOrigin-RevId: 718841870
Change-Id: Ic09dc9de140a35dbb45ab9d90f58383cf2de8286

Gbp-Pq: Name CVE-2025-0838.patch

7 months agocordz-info-statistics-test
Benjamin Barenblat [Mon, 12 May 2025 15:26:59 +0000 (17:26 +0200)]
cordz-info-statistics-test

Gbp-Pq: Name cordz-info-statistics-test.diff

7 months agoDo not leak -maes -msse4.1 into pkgconfig
Bruno Pitrus [Mon, 12 May 2025 15:26:59 +0000 (17:26 +0200)]
Do not leak -maes -msse4.1 into pkgconfig

Forwarded: https://github.com/abseil/abseil-cpp/pull/1216
Origin: upstream, https://github.com/abseil/abseil-cpp/commit/09e96049995584c3489e4bd1467313e3e85af99c

Gbp-Pq: Name leaky-pkgconfig-cflags.diff

7 months agoEliminate libabsl_flags.so and libabsl_flags.a
Benjamin Barenblat [Mon, 12 May 2025 15:26:59 +0000 (17:26 +0200)]
Eliminate libabsl_flags.so and libabsl_flags.a

Forwarded: not-needed

The libabsl_flags library only contains code when compiling with MSVC, which
Debian doesn't use. Skip compiling absl/flags/flag.cc, and make the Abseil flags
library header-only.

Gbp-Pq: Name empty-flags-library.diff

7 months agoUse libatomic if necessary
Benjamin Barenblat [Mon, 12 May 2025 15:26:59 +0000 (17:26 +0200)]
Use libatomic if necessary

Bug-Debian: https://bugs.debian.org/973492

On some architectures, notably armel, Abseil needs symbols defined in
libatomic. Abseil does not currently have a well-developed system to
declare external library dependencies, so just have the linker determine
if anything needs libatomic and add the DT_NEEDED entry where necessary.

Gbp-Pq: Name latomic.diff

7 months agoCanonicalize supported CPU feature set
Benjamin Barenblat [Mon, 12 May 2025 15:26:59 +0000 (17:26 +0200)]
Canonicalize supported CPU feature set

Forwarded: not-needed

Explicitly set supported CPU features.

  - Disable Intel SSE and SSE2 on i386, since Debian supports some i386
    processors without those extensions. Keep them enabled on amd64, since all
    amd64 processors have them.

  - Disable Intel SSSE3 entirely, since no i386 processor supports it and Debian
    supports amd64 processors without it.

  - Disable NEON on armel and armhf, since no armel processor supports NEON and
    Debian supports some armhf processors without it. Keep it enabled on arm64,
    since all arm64 processors have it.

Gbp-Pq: Name cpu-features.diff

7 months agoSet package configuration options
Benjamin Barenblat [Mon, 12 May 2025 15:26:59 +0000 (17:26 +0200)]
Set package configuration options

Forwarded: not-needed

Configure Abseil for Debian.

  - Set the SONAME appropriately.

  - To minimize the possibility of future ABI breakage, treat absl::any,
    absl::optional, absl::string_view, and absl::variant as their own types
    (rather than aliases for the std:: versions), and compile everything in an
    inline namespace.

  - Enable upstream's hardened build mode.

Gbp-Pq: Name configure.diff

7 months agoabseil (20220623.1-1+deb12u2) bookworm; urgency=medium
Tobias Frost [Mon, 12 May 2025 15:26:59 +0000 (17:26 +0200)]
abseil (20220623.1-1+deb12u2) bookworm; urgency=medium

  * Skip absl_failure_signal_handler_test on ppc64el, it's known to fail.

[dgit import unpatched abseil 20220623.1-1+deb12u2]

7 months agoImport abseil_20220623.1-1+deb12u2.debian.tar.xz
Tobias Frost [Mon, 12 May 2025 15:26:59 +0000 (17:26 +0200)]
Import abseil_20220623.1-1+deb12u2.debian.tar.xz

[dgit import tarball abseil 20220623.1-1+deb12u2 abseil_20220623.1-1+deb12u2.debian.tar.xz]

2 years agoMerge abseil (20220623.1-1+rpi1) import into refs/heads/workingbranch
Peter Michael Green [Sun, 8 Jan 2023 21:54:44 +0000 (21:54 +0000)]
Merge abseil (20220623.1-1+rpi1) import into refs/heads/workingbranch

2 years agocordz-info-statistics-test
Benjamin Barenblat [Sun, 8 Jan 2023 21:54:44 +0000 (21:54 +0000)]
cordz-info-statistics-test

Gbp-Pq: Name cordz-info-statistics-test.diff

2 years agoDo not leak -maes -msse4.1 into pkgconfig
Bruno Pitrus [Sun, 8 Jan 2023 21:54:44 +0000 (21:54 +0000)]
Do not leak -maes -msse4.1 into pkgconfig

Forwarded: https://github.com/abseil/abseil-cpp/pull/1216
Origin: upstream, https://github.com/abseil/abseil-cpp/commit/09e96049995584c3489e4bd1467313e3e85af99c

Gbp-Pq: Name leaky-pkgconfig-cflags.diff

2 years agoEliminate libabsl_flags.so and libabsl_flags.a
Benjamin Barenblat [Sun, 8 Jan 2023 21:54:44 +0000 (21:54 +0000)]
Eliminate libabsl_flags.so and libabsl_flags.a

Forwarded: not-needed

The libabsl_flags library only contains code when compiling with MSVC, which
Debian doesn't use. Skip compiling absl/flags/flag.cc, and make the Abseil flags
library header-only.

Gbp-Pq: Name empty-flags-library.diff

2 years agoUse libatomic if necessary
Benjamin Barenblat [Sun, 8 Jan 2023 21:54:44 +0000 (21:54 +0000)]
Use libatomic if necessary

Bug-Debian: https://bugs.debian.org/973492

On some architectures, notably armel, Abseil needs symbols defined in
libatomic. Abseil does not currently have a well-developed system to
declare external library dependencies, so just have the linker determine
if anything needs libatomic and add the DT_NEEDED entry where necessary.

Gbp-Pq: Name latomic.diff

2 years agoCanonicalize supported CPU feature set
Benjamin Barenblat [Sun, 8 Jan 2023 21:54:44 +0000 (21:54 +0000)]
Canonicalize supported CPU feature set

Forwarded: not-needed

Explicitly set supported CPU features.

  - Disable Intel SSE and SSE2 on i386, since Debian supports some i386
    processors without those extensions. Keep them enabled on amd64, since all
    amd64 processors have them.

  - Disable Intel SSSE3 entirely, since no i386 processor supports it and Debian
    supports amd64 processors without it.

  - Disable NEON on armel and armhf, since no armel processor supports NEON and
    Debian supports some armhf processors without it. Keep it enabled on arm64,
    since all arm64 processors have it.

Gbp-Pq: Name cpu-features.diff

2 years agoSet package configuration options
Benjamin Barenblat [Sun, 8 Jan 2023 21:54:44 +0000 (21:54 +0000)]
Set package configuration options

Forwarded: not-needed

Configure Abseil for Debian.

  - Set the SONAME appropriately.

  - To minimize the possibility of future ABI breakage, treat absl::any,
    absl::optional, absl::string_view, and absl::variant as their own types
    (rather than aliases for the std:: versions), and compile everything in an
    inline namespace.

  - Enable upstream's hardened build mode.

Gbp-Pq: Name configure.diff

2 years agoabseil (20220623.1-1+rpi1) bookworm-staging; urgency=medium
Peter Michael Green [Sun, 8 Jan 2023 21:54:44 +0000 (21:54 +0000)]
abseil (20220623.1-1+rpi1) bookworm-staging; urgency=medium

  * Disable testsuite on armhf.

[dgit import unpatched abseil 20220623.1-1+rpi1]

2 years agoImport abseil_20220623.1-1+rpi1.debian.tar.xz
Peter Michael Green [Sun, 8 Jan 2023 21:54:44 +0000 (21:54 +0000)]
Import abseil_20220623.1-1+rpi1.debian.tar.xz

[dgit import tarball abseil 20220623.1-1+rpi1 abseil_20220623.1-1+rpi1.debian.tar.xz]

3 years agoMerge abseil (20220623.1-1) import into refs/heads/workingbranch
Benjamin Barenblat [Tue, 18 Oct 2022 14:02:49 +0000 (15:02 +0100)]
Merge abseil (20220623.1-1) import into refs/heads/workingbranch

3 years agoImport abseil_20220623.1.orig.tar.gz
Benjamin Barenblat [Tue, 18 Oct 2022 14:02:49 +0000 (10:02 -0400)]
Import abseil_20220623.1.orig.tar.gz

[dgit import orig abseil_20220623.1.orig.tar.gz]

3 years agoImport abseil_20220623.1.orig.tar.gz
Benjamin Barenblat [Tue, 18 Oct 2022 14:02:49 +0000 (15:02 +0100)]
Import abseil_20220623.1.orig.tar.gz

[dgit import orig abseil_20220623.1.orig.tar.gz]

3 years agocordz-info-statistics-test
Benjamin Barenblat [Tue, 18 Oct 2022 14:02:49 +0000 (15:02 +0100)]
cordz-info-statistics-test

Gbp-Pq: Name cordz-info-statistics-test.diff

3 years agoDo not leak -maes -msse4.1 into pkgconfig
Bruno Pitrus [Tue, 18 Oct 2022 14:02:49 +0000 (15:02 +0100)]
Do not leak -maes -msse4.1 into pkgconfig

Forwarded: https://github.com/abseil/abseil-cpp/pull/1216
Origin: upstream, https://github.com/abseil/abseil-cpp/commit/09e96049995584c3489e4bd1467313e3e85af99c

Gbp-Pq: Name leaky-pkgconfig-cflags.diff

3 years agoEliminate libabsl_flags.so and libabsl_flags.a
Benjamin Barenblat [Tue, 18 Oct 2022 14:02:49 +0000 (15:02 +0100)]
Eliminate libabsl_flags.so and libabsl_flags.a

Forwarded: not-needed

The libabsl_flags library only contains code when compiling with MSVC, which
Debian doesn't use. Skip compiling absl/flags/flag.cc, and make the Abseil flags
library header-only.

Gbp-Pq: Name empty-flags-library.diff

3 years agoUse libatomic if necessary
Benjamin Barenblat [Tue, 18 Oct 2022 14:02:49 +0000 (15:02 +0100)]
Use libatomic if necessary

Bug-Debian: https://bugs.debian.org/973492

On some architectures, notably armel, Abseil needs symbols defined in
libatomic. Abseil does not currently have a well-developed system to
declare external library dependencies, so just have the linker determine
if anything needs libatomic and add the DT_NEEDED entry where necessary.

Gbp-Pq: Name latomic.diff

3 years agoCanonicalize supported CPU feature set
Benjamin Barenblat [Tue, 18 Oct 2022 14:02:49 +0000 (15:02 +0100)]
Canonicalize supported CPU feature set

Forwarded: not-needed

Explicitly set supported CPU features.

  - Disable Intel SSE and SSE2 on i386, since Debian supports some i386
    processors without those extensions. Keep them enabled on amd64, since all
    amd64 processors have them.

  - Disable Intel SSSE3 entirely, since no i386 processor supports it and Debian
    supports amd64 processors without it.

  - Disable NEON on armel and armhf, since no armel processor supports NEON and
    Debian supports some armhf processors without it. Keep it enabled on arm64,
    since all arm64 processors have it.

Gbp-Pq: Name cpu-features.diff

3 years agoSet package configuration options
Benjamin Barenblat [Tue, 18 Oct 2022 14:02:49 +0000 (15:02 +0100)]
Set package configuration options

Forwarded: not-needed

Configure Abseil for Debian.

  - Set the SONAME appropriately.

  - To minimize the possibility of future ABI breakage, treat absl::any,
    absl::optional, absl::string_view, and absl::variant as their own types
    (rather than aliases for the std:: versions), and compile everything in an
    inline namespace.

  - Enable upstream's hardened build mode.

Gbp-Pq: Name configure.diff

3 years agoabseil (20220623.1-1) unstable; urgency=medium
Benjamin Barenblat [Tue, 18 Oct 2022 14:02:49 +0000 (15:02 +0100)]
abseil (20220623.1-1) unstable; urgency=medium

  * New upstream release.

[dgit import unpatched abseil 20220623.1-1]

3 years agoImport abseil_20220623.1-1.debian.tar.xz
Benjamin Barenblat [Tue, 18 Oct 2022 14:02:49 +0000 (15:02 +0100)]
Import abseil_20220623.1-1.debian.tar.xz

[dgit import tarball abseil 20220623.1-1 abseil_20220623.1-1.debian.tar.xz]

3 years agoMerge abseil (0~20220623.0-2) import into refs/heads/workingbranch
Benjamin Barenblat [Wed, 31 Aug 2022 02:54:45 +0000 (03:54 +0100)]
Merge abseil (0~20220623.0-2) import into refs/heads/workingbranch

3 years agocordz-info-statistics-test
Benjamin Barenblat [Wed, 31 Aug 2022 02:54:45 +0000 (03:54 +0100)]
cordz-info-statistics-test

Gbp-Pq: Name cordz-info-statistics-test.diff

3 years agoDo not leak -maes -msse4.1 into pkgconfig
Bruno Pitrus [Wed, 31 Aug 2022 02:54:45 +0000 (03:54 +0100)]
Do not leak -maes -msse4.1 into pkgconfig

Forwarded: https://github.com/abseil/abseil-cpp/pull/1216
Origin: upstream, https://github.com/abseil/abseil-cpp/commit/09e96049995584c3489e4bd1467313e3e85af99c

Gbp-Pq: Name leaky-pkgconfig-cflags.diff

3 years agoEliminate libabsl_flags.so and libabsl_flags.a
Benjamin Barenblat [Wed, 31 Aug 2022 02:54:45 +0000 (03:54 +0100)]
Eliminate libabsl_flags.so and libabsl_flags.a

Forwarded: not-needed

The libabsl_flags library only contains code when compiling with MSVC, which
Debian doesn't use. Skip compiling absl/flags/flag.cc, and make the Abseil flags
library header-only.

Gbp-Pq: Name empty-flags-library.diff

3 years agoUse libatomic if necessary
Benjamin Barenblat [Wed, 31 Aug 2022 02:54:45 +0000 (03:54 +0100)]
Use libatomic if necessary

Bug-Debian: https://bugs.debian.org/973492

On some architectures, notably armel, Abseil needs symbols defined in
libatomic. Abseil does not currently have a well-developed system to
declare external library dependencies, so just have the linker determine
if anything needs libatomic and add the DT_NEEDED entry where necessary.

Gbp-Pq: Name latomic.diff

3 years agoCanonicalize supported CPU feature set
Benjamin Barenblat [Wed, 31 Aug 2022 02:54:45 +0000 (03:54 +0100)]
Canonicalize supported CPU feature set

Forwarded: not-needed

Explicitly set supported CPU features.

  - Disable Intel SSE and SSE2 on i386, since Debian supports some i386
    processors without those extensions. Keep them enabled on amd64, since all
    amd64 processors have them.

  - Disable Intel SSSE3 entirely, since no i386 processor supports it and Debian
    supports amd64 processors without it.

  - Disable NEON on armel and armhf, since no armel processor supports NEON and
    Debian supports some armhf processors without it. Keep it enabled on arm64,
    since all arm64 processors have it.

Gbp-Pq: Name cpu-features.diff

3 years agoSet package configuration options
Benjamin Barenblat [Wed, 31 Aug 2022 02:54:45 +0000 (03:54 +0100)]
Set package configuration options

Forwarded: not-needed

Configure Abseil for Debian.

  - Set the SONAME appropriately.

  - To minimize the possibility of future ABI breakage, treat absl::any,
    absl::optional, absl::string_view, and absl::variant as their own types
    (rather than aliases for the std:: versions), and compile everything in an
    inline namespace.

  - Enable upstream's hardened build mode.

Gbp-Pq: Name configure.diff

3 years agoabseil (0~20220623.0-2) unstable; urgency=medium
Benjamin Barenblat [Wed, 31 Aug 2022 02:54:45 +0000 (03:54 +0100)]
abseil (0~20220623.0-2) unstable; urgency=medium

  * Backport an upstream patch to correct pkg-config file generation.

[dgit import unpatched abseil 0~20220623.0-2]

3 years agoImport abseil_0~20220623.0-2.debian.tar.xz
Benjamin Barenblat [Wed, 31 Aug 2022 02:54:45 +0000 (03:54 +0100)]
Import abseil_0~20220623.0-2.debian.tar.xz

[dgit import tarball abseil 0~20220623.0-2 abseil_0~20220623.0-2.debian.tar.xz]

3 years agoImport abseil_0~20220623.0.orig.tar.gz
Benjamin Barenblat [Tue, 23 Aug 2022 02:17:36 +0000 (03:17 +0100)]
Import abseil_0~20220623.0.orig.tar.gz

[dgit import orig abseil_0~20220623.0.orig.tar.gz]

3 years agoMerge abseil (0~20210324.2-4) import into refs/heads/workingbranch
Benjamin Barenblat [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Merge abseil (0~20210324.2-4) import into refs/heads/workingbranch

3 years agoCheck printf format strings in str_format_convert_test
Benjamin Barenblat [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Check printf format strings in str_format_convert_test

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/1963f10ae5cb32a7ea6d96b928f69d3c7fba0139
Bug-Debian: https://bugs.debian.org/1011294

Don’t use generator expression to build .pc Libs lines

When building pkg-config files, compute linker flags with a string
substitution rather than the JOIN generator expression. This ensures
that commas in linker flags don’t get treated as argument separators in
JOIN.

The author works at Google. Upstream applied this patch as Piper
revision 450675966 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name pkg-config-libs-generation.diff

3 years agoCheck printf format strings in str_format_convert_test
Benjamin Barenblat [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Check printf format strings in str_format_convert_test

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/9fed77a6fea29b8c8468bd41c6259c7f67163a65

Add ABSL_PRINTF_ATTRIBUTE to appropriate functions in
strings/internal/str_format/convert_test. Correct
TypedFormatConvertTest.Char, which was accidentally passing values of
types larger than int to StrPrint.

The author works at Google. Upstream applied this patch as Piper
revision 439388148 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name str-format-convert-test-printf.diff

3 years agoSupport symbolization on PA-RISC
Benjamin Barenblat [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Support symbolization on PA-RISC

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/7f850b3167fb38e6b4a9ce1824e6fabd733b5d62

Null out supervisor bits in PA-RISC addresses before symbolizing, and
handle function descriptor tables correctly.

Change symbolize_test.cc to use 32-bit aligned addresses, allowing that
test to pass on PA-RISC.

The author works at Google. Upstream applied this patch as Piper
revision 428590564 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name hppa-symbolize.diff

3 years agoRemove the test for absl::base_internal::NominalCPUFrequency() from OSS code
Derek Mauro [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Remove the test for absl::base_internal::NominalCPUFrequency() from OSS code

Origin: upstream, https://github.com/abseil/abseil-cpp/commit/732b5580f089101ce4b8cdff55bb6461c59a6720

Remove the test for absl::base_internal::NominalCPUFrequency() from OSS code

This is an internal-only function that should never by called by OSS code.
By its nature fails on unsupported platforms.
Google code has tests for this function on supported internal platforms.

Fixes #1053

PiperOrigin-RevId: 408692861

Gbp-Pq: Name disable-nominalcpufrequency-test.diff

3 years agoFix Randen and PCG on Big Endian platforms (#1031)
Milad Fa [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Fix Randen and PCG on Big Endian platforms (#1031)

Forwarded: https://github.com/abseil/abseil-cpp/pull/1031
Origin: upstream, https://github.com/abseil/abseil-cpp/commit/022527c50e0e2bc937f9fa3c516e3e36cbba0845

Gbp-Pq: Name big-endian-random4.diff

3 years agoAlso use uint8_t golden values in randen_test.cc
Laramie Leavitt [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Also use uint8_t golden values in randen_test.cc

Forwarded: yes
Origin: upstream, https://github.com/abseil/abseil-cpp/commit/cc413f8b674d61e3aa948386432e526e051afca0

Also use uint8_t golden values in randen_test.cc

This makes randen_test, randen_slow_test, and randen_hwaes_test essentially
identical, as is the intent.

The author works at Google. Upstream applied this patch as Piper
revision 405484423 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name big-endian-random3.diff

3 years agoMake randen_slow endian-correct
Benjamin Barenblat [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Make randen_slow endian-correct

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/33541e751039a8c4bd3a395dd1a3a0928885814a

Pay attention to the platform endianness when pulling bytes out of each
AES block, and use platform-endian round keys.

The author works at Google. Upstream applied this patch as Piper
revision 383878281 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name big-endian-random2.diff

3 years agoUse absl::uint128 for AES random number generator
Benjamin Barenblat [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Use absl::uint128 for AES random number generator

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/b06e719ee985ecd63e0dffbc68499549216f817f

Replace randen’s internal 128-bit integer struct, u64x2, with
absl::uint128. This eliminates some code and improves support for
big-endian platforms.

The author works at Google. Upstream applied this patch as Piper
revision 383475671 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name big-endian-random.diff

3 years agoFix hashing on big endian platforms (#1028)
Milad Fa [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Fix hashing on big endian platforms (#1028)

Forwarded: https://github.com/abseil/abseil-cpp/pull/1028
Origin: backport, https://github.com/abseil/abseil-cpp/commit/ae0f4c266095c9003786cd571bc1fb72544104a1
Bug-Debian: https://bugs.debian.org/977638

Avoid using libstdc++'s implementation of std::hash<std::bitset> and
std::hash<std::vector> on big endian platforms in the implementation
of absl::Hash.

This is a workaround for a buggy implementation that results in many
collisions.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102531
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98731

Gbp-Pq: Name big-endian-hash2.diff

3 years agoRestructure wyhash_test.cc to separate golden values
Benjamin Barenblat [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Restructure wyhash_test.cc to separate golden values

Forwarded: yes
Origin: backport, https://github.com/abseil/abseil-cpp/commit/a05366d851c5cb88065272f951e03955197e7c11

This patch is a subset of the referenced commit, which originally also changed
the mix function on arm64. The original message is as follows:

    Alternative bit mixer for LowLevelHash on ARM

    LowLevelHash's bit-mixer is inefficient on ARM because it calculates
    a 128-bit product of two 64-bit numbers. On ARM, this requires a
    sequence of two instructions with a high combined latency and poor
    throughput. This change provides alternative bit-mixing code for ARM
    that uses only 64-bit arithmetic (multiplication, xor, and
    left-shifts) and speeds things up considerably.

    The bit-mixing code for ARM was inspired by by Woothash[1] and
    xxh3[1]. Once I landed on a sequence of operations that provided
    good mixing, I used a test harness to search for the combination of
    shift / rotate factors that provided the best mixing, as indicated
    by SMHasher hash quality tests. The new mixing code passes 13 out of
    15 of the hash quality test suites in SMHasher, with the two
    failures being in the noise range: e.g. 1 collision vs. zero
    expected in a keyset of ~8m keys.

          [1]: https://github.com/tommyettinger/waterhash/blob/49f5cf0b63b9/woothash.h#L16-L20
          [2]: https://github.com/Cyan4973/xxHash/blob/6853ddc36e46/xxhash.h#L3240-L3265

    PiperOrigin-RevId: 391833008

This restructuring is a prerequisite for big-endian-hash2.diff.

Gbp-Pq: Name big-endian-hash.diff

3 years agoRound a double multiplication before casting it to integer
Benjamin Barenblat [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Round a double multiplication before casting it to integer

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/60be12ed9822078970f05f3c560324184302df6b

The code

    static_cast<int>(x * y)

(for double x and y) performs a double multiplication into a temporary
that, by standard, may have excess precision. The subsequent cast to int
discards the excess precision. However, the cast may examine the excess
precision during conversion, producing surprising results like

    static_cast<int>(1.7 * 10) == 16

on certain systems. Correct this case by explicitly rounding 1.7 * 10
before casting it.

The author works at Google. Upstream applied this patch as Piper
revision 378922064 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name missing-rint.diff

3 years agoSkip floating-point edge-case tests when using an x87
Benjamin Barenblat [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Skip floating-point edge-case tests when using an x87

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/311bbd2e50ea35e921a08186840d3b6ca279e880

32-bit Intel CPUs use 80-bit floats for intermediate values, which can
change the results of floating point computations from what we normally
expect. Identify tests that are sensitive to the x87, and skip them when
we’re on 32-bit Intel.

The author works at Google. Upstream applied this patch as Piper
revision 378722613 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name float-tests-disable-i386.diff

3 years agoDon’t examine irrelevant destination buckets in DiscreteDistributionTest
Benjamin Barenblat [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Don’t examine irrelevant destination buckets in DiscreteDistributionTest

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/7ba826e50dff1878e6ecc6b9af44097c040c8968

Abseil generates discrete distributions using Walker’s aliasing
algorithm. This creates uniformly distributed buckets, each with a
probability of sending traffic to a different bucket. Abseil represents
a bucket as a pair

    (probability of retaining traffic ×
     alternate bucket if traffic is passed)

and a distribution as a vector of such pairs. For example, {(0.3, 1),
(1.0, 1)} represents a distribution with two buckets, the zeroth of
which passes 70% of its traffic to bucket 1 and the first of which holds
on to all its traffic.

This representation is not unique: When a bucket retains traffic with
probability 1, the alternate bucket is irrelevant. Continuing the
example above, {(0.3, 1), (1.0, 0)} _also_ represents a two-bucket
distribution where the zeroth bucket passes 70% of its traffic to the
first and the first hangs on to all traffic. Exactly what representation
Abseil generates for a given input is related to how much precision is
used in intermediate floating-point operations, which is an
architectural implementation detail. Remove sensitivity to that detail
by not examining the alternate bucket when the retention probability is
1.0.

The author works at Google. Upstream applied this patch as Piper
revision 372993410 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name DiscreteDistributionTest-irrelevant-destination-buckets.diff

3 years agoRound floats using round(x), not static_cast<int>(x + 0.5)
Benjamin Barenblat [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Round floats using round(x), not static_cast<int>(x + 0.5)

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/d96e287417766deddbff2d01b96321288c59491e

Adding 0.5 to an IEEE float may cause one bit of precision loss, which
is enough to change the result in certain cases. For example,

    static_cast<int>(std::round(0.49999999999999994)) == 0
    static_cast<int>(0.49999999999999994 + 0.5) == 1

The author works at Google. Upstream applied this patch as Piper
revision 369926519 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name float-rounding.diff

3 years agoCorrect Thumb function bound computation in the symbolizer
Benjamin Barenblat [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Correct Thumb function bound computation in the symbolizer

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/1ae9b71c474628d60eb251a3f62967fe64151bb2

On 32-bit ARM, all functions are aligned to multiples of two bytes, and
the lowest-order bit in a function’s address is ignored by the CPU when
computing branch targets. That bit is still present in instructions and
ELF symbol tables, though; it’s repurposed to indicate whether the
function contains ARM or Thumb code. If the symbolizer doesn’t ignore
that bit, it will believe Thumb functions have boundaries that are off
by one byte, so instruct the symbolizer to null out the lowest-order bit
after retrieving it from the symbol table.

The author works at Google. Upstream applied this patch as Piper
revision 369254082 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name thumb-function-bounds.diff

3 years agoFix typo in CordRepRing error message
Benjamin Barenblat [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Fix typo in CordRepRing error message

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/b97a1ecda869ca8754d467a56c50275cebfeb328

The author works at Google. Upstream applied this patch as Piper
revision 367481280 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name cordrepring-typo.diff

3 years agoEliminate libabsl_flags.so and libabsl_flags.a
Benjamin Barenblat [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Eliminate libabsl_flags.so and libabsl_flags.a

Forwarded: not-needed

The libabsl_flags library only contains code when compiling with MSVC, which
Debian doesn't use. Skip compiling absl/flags/flag.cc, and make the Abseil flags
library header-only.

Gbp-Pq: Name empty-flags-library.diff

3 years agoUse libatomic if necessary
Benjamin Barenblat [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Use libatomic if necessary

Bug-Debian: https://bugs.debian.org/973492

On some architectures, notably armel, Abseil needs symbols defined in
libatomic. Abseil does not currently have a well-developed system to
declare external library dependencies, so just have the linker determine
if anything needs libatomic and add the DT_NEEDED entry where necessary.

Gbp-Pq: Name latomic.diff

3 years agoSet package configuration options
Benjamin Barenblat [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Set package configuration options

Forwarded: not-needed

Configure Abseil for Debian.

  - Set the SONAME appropriately.

  - To minimize the possibility of future ABI breakage, treat absl::any,
    absl::optional, absl::string_view, and absl::variant as their own types
    (rather than aliases for the std:: versions), and compile everything in an
    inline namespace.

  - Enable upstream's hardened build mode.

  - Disable Intel SSE2 on i386, since Debian supports some i386 processors
    without that extension. Keep it enabled on amd64, since all amd64 processors
    have it.

  - Disable Intel SSSE3 entirely, since no i386 processor supports it and Debian
    supports amd64 processors without it.

Gbp-Pq: Name configure.diff

3 years agoabseil (0~20210324.2-4) unstable; urgency=medium
Benjamin Barenblat [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
abseil (0~20210324.2-4) unstable; urgency=medium

  * Fix "spurious -Wl flag in some pkg-config entries" by backporting a
    patch from upstream that corrects CMake pkg-config generation.
    (Closes: #1011294)

[dgit import unpatched abseil 0~20210324.2-4]

3 years agoImport abseil_0~20210324.2-4.debian.tar.xz
Benjamin Barenblat [Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)]
Import abseil_0~20210324.2-4.debian.tar.xz

[dgit import tarball abseil 0~20210324.2-4 abseil_0~20210324.2-4.debian.tar.xz]

3 years agoMerge abseil (0~20210324.2-3) import into refs/heads/workingbranch
Benjamin Barenblat [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Merge abseil (0~20210324.2-3) import into refs/heads/workingbranch

3 years agoCheck printf format strings in str_format_convert_test
Benjamin Barenblat [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Check printf format strings in str_format_convert_test

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/9fed77a6fea29b8c8468bd41c6259c7f67163a65

Add ABSL_PRINTF_ATTRIBUTE to appropriate functions in
strings/internal/str_format/convert_test. Correct
TypedFormatConvertTest.Char, which was accidentally passing values of
types larger than int to StrPrint.

The author works at Google. Upstream applied this patch as Piper
revision 439388148 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name str-format-convert-test-printf.diff

3 years agoSupport symbolization on PA-RISC
Benjamin Barenblat [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Support symbolization on PA-RISC

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/7f850b3167fb38e6b4a9ce1824e6fabd733b5d62

Null out supervisor bits in PA-RISC addresses before symbolizing, and
handle function descriptor tables correctly.

Change symbolize_test.cc to use 32-bit aligned addresses, allowing that
test to pass on PA-RISC.

The author works at Google. Upstream applied this patch as Piper
revision 428590564 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name hppa-symbolize.diff

3 years agoRemove the test for absl::base_internal::NominalCPUFrequency() from OSS code
Derek Mauro [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Remove the test for absl::base_internal::NominalCPUFrequency() from OSS code

Origin: upstream, https://github.com/abseil/abseil-cpp/commit/732b5580f089101ce4b8cdff55bb6461c59a6720

Remove the test for absl::base_internal::NominalCPUFrequency() from OSS code

This is an internal-only function that should never by called by OSS code.
By its nature fails on unsupported platforms.
Google code has tests for this function on supported internal platforms.

Fixes #1053

PiperOrigin-RevId: 408692861

Gbp-Pq: Name disable-nominalcpufrequency-test.diff

3 years agoFix Randen and PCG on Big Endian platforms (#1031)
Milad Fa [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Fix Randen and PCG on Big Endian platforms (#1031)

Forwarded: https://github.com/abseil/abseil-cpp/pull/1031
Origin: upstream, https://github.com/abseil/abseil-cpp/commit/022527c50e0e2bc937f9fa3c516e3e36cbba0845

Gbp-Pq: Name big-endian-random4.diff

3 years agoAlso use uint8_t golden values in randen_test.cc
Laramie Leavitt [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Also use uint8_t golden values in randen_test.cc

Forwarded: yes
Origin: upstream, https://github.com/abseil/abseil-cpp/commit/cc413f8b674d61e3aa948386432e526e051afca0

Also use uint8_t golden values in randen_test.cc

This makes randen_test, randen_slow_test, and randen_hwaes_test essentially
identical, as is the intent.

The author works at Google. Upstream applied this patch as Piper
revision 405484423 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name big-endian-random3.diff

3 years agoMake randen_slow endian-correct
Benjamin Barenblat [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Make randen_slow endian-correct

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/33541e751039a8c4bd3a395dd1a3a0928885814a

Pay attention to the platform endianness when pulling bytes out of each
AES block, and use platform-endian round keys.

The author works at Google. Upstream applied this patch as Piper
revision 383878281 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name big-endian-random2.diff

3 years agoUse absl::uint128 for AES random number generator
Benjamin Barenblat [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Use absl::uint128 for AES random number generator

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/b06e719ee985ecd63e0dffbc68499549216f817f

Replace randen’s internal 128-bit integer struct, u64x2, with
absl::uint128. This eliminates some code and improves support for
big-endian platforms.

The author works at Google. Upstream applied this patch as Piper
revision 383475671 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name big-endian-random.diff

3 years agoFix hashing on big endian platforms (#1028)
Milad Fa [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Fix hashing on big endian platforms (#1028)

Forwarded: https://github.com/abseil/abseil-cpp/pull/1028
Origin: backport, https://github.com/abseil/abseil-cpp/commit/ae0f4c266095c9003786cd571bc1fb72544104a1
Bug-Debian: https://bugs.debian.org/977638

Avoid using libstdc++'s implementation of std::hash<std::bitset> and
std::hash<std::vector> on big endian platforms in the implementation
of absl::Hash.

This is a workaround for a buggy implementation that results in many
collisions.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102531
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98731

Gbp-Pq: Name big-endian-hash2.diff

3 years agoRestructure wyhash_test.cc to separate golden values
Benjamin Barenblat [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Restructure wyhash_test.cc to separate golden values

Forwarded: yes
Origin: backport, https://github.com/abseil/abseil-cpp/commit/a05366d851c5cb88065272f951e03955197e7c11

This patch is a subset of the referenced commit, which originally also changed
the mix function on arm64. The original message is as follows:

    Alternative bit mixer for LowLevelHash on ARM

    LowLevelHash's bit-mixer is inefficient on ARM because it calculates
    a 128-bit product of two 64-bit numbers. On ARM, this requires a
    sequence of two instructions with a high combined latency and poor
    throughput. This change provides alternative bit-mixing code for ARM
    that uses only 64-bit arithmetic (multiplication, xor, and
    left-shifts) and speeds things up considerably.

    The bit-mixing code for ARM was inspired by by Woothash[1] and
    xxh3[1]. Once I landed on a sequence of operations that provided
    good mixing, I used a test harness to search for the combination of
    shift / rotate factors that provided the best mixing, as indicated
    by SMHasher hash quality tests. The new mixing code passes 13 out of
    15 of the hash quality test suites in SMHasher, with the two
    failures being in the noise range: e.g. 1 collision vs. zero
    expected in a keyset of ~8m keys.

          [1]: https://github.com/tommyettinger/waterhash/blob/49f5cf0b63b9/woothash.h#L16-L20
          [2]: https://github.com/Cyan4973/xxHash/blob/6853ddc36e46/xxhash.h#L3240-L3265

    PiperOrigin-RevId: 391833008

This restructuring is a prerequisite for big-endian-hash2.diff.

Gbp-Pq: Name big-endian-hash.diff

3 years agoRound a double multiplication before casting it to integer
Benjamin Barenblat [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Round a double multiplication before casting it to integer

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/60be12ed9822078970f05f3c560324184302df6b

The code

    static_cast<int>(x * y)

(for double x and y) performs a double multiplication into a temporary
that, by standard, may have excess precision. The subsequent cast to int
discards the excess precision. However, the cast may examine the excess
precision during conversion, producing surprising results like

    static_cast<int>(1.7 * 10) == 16

on certain systems. Correct this case by explicitly rounding 1.7 * 10
before casting it.

The author works at Google. Upstream applied this patch as Piper
revision 378922064 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name missing-rint.diff

3 years agoSkip floating-point edge-case tests when using an x87
Benjamin Barenblat [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Skip floating-point edge-case tests when using an x87

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/311bbd2e50ea35e921a08186840d3b6ca279e880

32-bit Intel CPUs use 80-bit floats for intermediate values, which can
change the results of floating point computations from what we normally
expect. Identify tests that are sensitive to the x87, and skip them when
we’re on 32-bit Intel.

The author works at Google. Upstream applied this patch as Piper
revision 378722613 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name float-tests-disable-i386.diff

3 years agoDon’t examine irrelevant destination buckets in DiscreteDistributionTest
Benjamin Barenblat [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Don’t examine irrelevant destination buckets in DiscreteDistributionTest

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/7ba826e50dff1878e6ecc6b9af44097c040c8968

Abseil generates discrete distributions using Walker’s aliasing
algorithm. This creates uniformly distributed buckets, each with a
probability of sending traffic to a different bucket. Abseil represents
a bucket as a pair

    (probability of retaining traffic ×
     alternate bucket if traffic is passed)

and a distribution as a vector of such pairs. For example, {(0.3, 1),
(1.0, 1)} represents a distribution with two buckets, the zeroth of
which passes 70% of its traffic to bucket 1 and the first of which holds
on to all its traffic.

This representation is not unique: When a bucket retains traffic with
probability 1, the alternate bucket is irrelevant. Continuing the
example above, {(0.3, 1), (1.0, 0)} _also_ represents a two-bucket
distribution where the zeroth bucket passes 70% of its traffic to the
first and the first hangs on to all traffic. Exactly what representation
Abseil generates for a given input is related to how much precision is
used in intermediate floating-point operations, which is an
architectural implementation detail. Remove sensitivity to that detail
by not examining the alternate bucket when the retention probability is
1.0.

The author works at Google. Upstream applied this patch as Piper
revision 372993410 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name DiscreteDistributionTest-irrelevant-destination-buckets.diff

3 years agoRound floats using round(x), not static_cast<int>(x + 0.5)
Benjamin Barenblat [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Round floats using round(x), not static_cast<int>(x + 0.5)

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/d96e287417766deddbff2d01b96321288c59491e

Adding 0.5 to an IEEE float may cause one bit of precision loss, which
is enough to change the result in certain cases. For example,

    static_cast<int>(std::round(0.49999999999999994)) == 0
    static_cast<int>(0.49999999999999994 + 0.5) == 1

The author works at Google. Upstream applied this patch as Piper
revision 369926519 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name float-rounding.diff

3 years agoCorrect Thumb function bound computation in the symbolizer
Benjamin Barenblat [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Correct Thumb function bound computation in the symbolizer

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/1ae9b71c474628d60eb251a3f62967fe64151bb2

On 32-bit ARM, all functions are aligned to multiples of two bytes, and
the lowest-order bit in a function’s address is ignored by the CPU when
computing branch targets. That bit is still present in instructions and
ELF symbol tables, though; it’s repurposed to indicate whether the
function contains ARM or Thumb code. If the symbolizer doesn’t ignore
that bit, it will believe Thumb functions have boundaries that are off
by one byte, so instruct the symbolizer to null out the lowest-order bit
after retrieving it from the symbol table.

The author works at Google. Upstream applied this patch as Piper
revision 369254082 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name thumb-function-bounds.diff

3 years agoFix typo in CordRepRing error message
Benjamin Barenblat [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Fix typo in CordRepRing error message

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/b97a1ecda869ca8754d467a56c50275cebfeb328

The author works at Google. Upstream applied this patch as Piper
revision 367481280 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name cordrepring-typo.diff

3 years agoEliminate libabsl_flags.so and libabsl_flags.a
Benjamin Barenblat [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Eliminate libabsl_flags.so and libabsl_flags.a

Forwarded: not-needed

The libabsl_flags library only contains code when compiling with MSVC, which
Debian doesn't use. Skip compiling absl/flags/flag.cc, and make the Abseil flags
library header-only.

Gbp-Pq: Name empty-flags-library.diff

3 years agoUse libatomic if necessary
Benjamin Barenblat [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Use libatomic if necessary

Bug-Debian: https://bugs.debian.org/973492

On some architectures, notably armel, Abseil needs symbols defined in
libatomic. Abseil does not currently have a well-developed system to
declare external library dependencies, so just have the linker determine
if anything needs libatomic and add the DT_NEEDED entry where necessary.

Gbp-Pq: Name latomic.diff

3 years agoSet package configuration options
Benjamin Barenblat [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Set package configuration options

Forwarded: not-needed

Configure Abseil for Debian.

  - Set the SONAME appropriately.

  - To minimize the possibility of future ABI breakage, treat absl::any,
    absl::optional, absl::string_view, and absl::variant as their own types
    (rather than aliases for the std:: versions), and compile everything in an
    inline namespace.

  - Enable upstream's hardened build mode.

  - Disable Intel SSE2 on i386, since Debian supports some i386 processors
    without that extension. Keep it enabled on amd64, since all amd64 processors
    have it.

  - Disable Intel SSSE3 entirely, since no i386 processor supports it and Debian
    supports amd64 processors without it.

Gbp-Pq: Name configure.diff

3 years agoabseil (0~20210324.2-3) unstable; urgency=medium
Benjamin Barenblat [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
abseil (0~20210324.2-3) unstable; urgency=medium

  * Backport an upstream patch to disable a problematic unit test.
    (Closes: #1007136)
  * Reenable unit tests on hppa.

[dgit import unpatched abseil 0~20210324.2-3]

3 years agoImport abseil_0~20210324.2-3.debian.tar.xz
Benjamin Barenblat [Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)]
Import abseil_0~20210324.2-3.debian.tar.xz

[dgit import tarball abseil 0~20210324.2-3 abseil_0~20210324.2-3.debian.tar.xz]

3 years agoMerge abseil (0~20210324.2-2) import into refs/heads/workingbranch
Benjamin Barenblat [Mon, 7 Feb 2022 16:54:21 +0000 (16:54 +0000)]
Merge abseil (0~20210324.2-2) import into refs/heads/workingbranch

3 years agoFix Randen and PCG on Big Endian platforms (#1031)
Milad Fa [Mon, 7 Feb 2022 16:54:21 +0000 (16:54 +0000)]
Fix Randen and PCG on Big Endian platforms (#1031)

Forwarded: https://github.com/abseil/abseil-cpp/pull/1031
Origin: upstream, https://github.com/abseil/abseil-cpp/commit/022527c50e0e2bc937f9fa3c516e3e36cbba0845

Gbp-Pq: Name big-endian-random4.diff

3 years agoAlso use uint8_t golden values in randen_test.cc
Laramie Leavitt [Mon, 7 Feb 2022 16:54:21 +0000 (16:54 +0000)]
Also use uint8_t golden values in randen_test.cc

Forwarded: yes
Origin: upstream, https://github.com/abseil/abseil-cpp/commit/cc413f8b674d61e3aa948386432e526e051afca0

Also use uint8_t golden values in randen_test.cc

This makes randen_test, randen_slow_test, and randen_hwaes_test essentially
identical, as is the intent.

The author works at Google. Upstream applied this patch as Piper
revision 405484423 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name big-endian-random3.diff

3 years agoMake randen_slow endian-correct
Benjamin Barenblat [Mon, 7 Feb 2022 16:54:21 +0000 (16:54 +0000)]
Make randen_slow endian-correct

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/33541e751039a8c4bd3a395dd1a3a0928885814a

Pay attention to the platform endianness when pulling bytes out of each
AES block, and use platform-endian round keys.

The author works at Google. Upstream applied this patch as Piper
revision 383878281 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name big-endian-random2.diff

3 years agoUse absl::uint128 for AES random number generator
Benjamin Barenblat [Mon, 7 Feb 2022 16:54:21 +0000 (16:54 +0000)]
Use absl::uint128 for AES random number generator

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/b06e719ee985ecd63e0dffbc68499549216f817f

Replace randen’s internal 128-bit integer struct, u64x2, with
absl::uint128. This eliminates some code and improves support for
big-endian platforms.

The author works at Google. Upstream applied this patch as Piper
revision 383475671 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name big-endian-random.diff

3 years agoFix hashing on big endian platforms (#1028)
Milad Fa [Mon, 7 Feb 2022 16:54:21 +0000 (16:54 +0000)]
Fix hashing on big endian platforms (#1028)

Forwarded: https://github.com/abseil/abseil-cpp/pull/1028
Origin: backport, https://github.com/abseil/abseil-cpp/commit/ae0f4c266095c9003786cd571bc1fb72544104a1
Bug-Debian: https://bugs.debian.org/977638

Avoid using libstdc++'s implementation of std::hash<std::bitset> and
std::hash<std::vector> on big endian platforms in the implementation
of absl::Hash.

This is a workaround for a buggy implementation that results in many
collisions.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102531
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98731

Gbp-Pq: Name big-endian-hash2.diff

3 years agoRestructure wyhash_test.cc to separate golden values
Benjamin Barenblat [Mon, 7 Feb 2022 16:54:21 +0000 (16:54 +0000)]
Restructure wyhash_test.cc to separate golden values

Forwarded: yes
Origin: backport, https://github.com/abseil/abseil-cpp/commit/a05366d851c5cb88065272f951e03955197e7c11

This patch is a subset of the referenced commit, which originally also changed
the mix function on arm64. The original message is as follows:

    Alternative bit mixer for LowLevelHash on ARM

    LowLevelHash's bit-mixer is inefficient on ARM because it calculates
    a 128-bit product of two 64-bit numbers. On ARM, this requires a
    sequence of two instructions with a high combined latency and poor
    throughput. This change provides alternative bit-mixing code for ARM
    that uses only 64-bit arithmetic (multiplication, xor, and
    left-shifts) and speeds things up considerably.

    The bit-mixing code for ARM was inspired by by Woothash[1] and
    xxh3[1]. Once I landed on a sequence of operations that provided
    good mixing, I used a test harness to search for the combination of
    shift / rotate factors that provided the best mixing, as indicated
    by SMHasher hash quality tests. The new mixing code passes 13 out of
    15 of the hash quality test suites in SMHasher, with the two
    failures being in the noise range: e.g. 1 collision vs. zero
    expected in a keyset of ~8m keys.

          [1]: https://github.com/tommyettinger/waterhash/blob/49f5cf0b63b9/woothash.h#L16-L20
          [2]: https://github.com/Cyan4973/xxHash/blob/6853ddc36e46/xxhash.h#L3240-L3265

    PiperOrigin-RevId: 391833008

This restructuring is a prerequisite for big-endian-hash2.diff.

Gbp-Pq: Name big-endian-hash.diff

3 years agoRound a double multiplication before casting it to integer
Benjamin Barenblat [Mon, 7 Feb 2022 16:54:21 +0000 (16:54 +0000)]
Round a double multiplication before casting it to integer

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/60be12ed9822078970f05f3c560324184302df6b

The code

    static_cast<int>(x * y)

(for double x and y) performs a double multiplication into a temporary
that, by standard, may have excess precision. The subsequent cast to int
discards the excess precision. However, the cast may examine the excess
precision during conversion, producing surprising results like

    static_cast<int>(1.7 * 10) == 16

on certain systems. Correct this case by explicitly rounding 1.7 * 10
before casting it.

The author works at Google. Upstream applied this patch as Piper
revision 378922064 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name missing-rint.diff

3 years agoSkip floating-point edge-case tests when using an x87
Benjamin Barenblat [Mon, 7 Feb 2022 16:54:21 +0000 (16:54 +0000)]
Skip floating-point edge-case tests when using an x87

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/311bbd2e50ea35e921a08186840d3b6ca279e880

32-bit Intel CPUs use 80-bit floats for intermediate values, which can
change the results of floating point computations from what we normally
expect. Identify tests that are sensitive to the x87, and skip them when
we’re on 32-bit Intel.

The author works at Google. Upstream applied this patch as Piper
revision 378722613 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name float-tests-disable-i386.diff

3 years agoDon’t examine irrelevant destination buckets in DiscreteDistributionTest
Benjamin Barenblat [Mon, 7 Feb 2022 16:54:21 +0000 (16:54 +0000)]
Don’t examine irrelevant destination buckets in DiscreteDistributionTest

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/7ba826e50dff1878e6ecc6b9af44097c040c8968

Abseil generates discrete distributions using Walker’s aliasing
algorithm. This creates uniformly distributed buckets, each with a
probability of sending traffic to a different bucket. Abseil represents
a bucket as a pair

    (probability of retaining traffic ×
     alternate bucket if traffic is passed)

and a distribution as a vector of such pairs. For example, {(0.3, 1),
(1.0, 1)} represents a distribution with two buckets, the zeroth of
which passes 70% of its traffic to bucket 1 and the first of which holds
on to all its traffic.

This representation is not unique: When a bucket retains traffic with
probability 1, the alternate bucket is irrelevant. Continuing the
example above, {(0.3, 1), (1.0, 0)} _also_ represents a two-bucket
distribution where the zeroth bucket passes 70% of its traffic to the
first and the first hangs on to all traffic. Exactly what representation
Abseil generates for a given input is related to how much precision is
used in intermediate floating-point operations, which is an
architectural implementation detail. Remove sensitivity to that detail
by not examining the alternate bucket when the retention probability is
1.0.

The author works at Google. Upstream applied this patch as Piper
revision 372993410 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name DiscreteDistributionTest-irrelevant-destination-buckets.diff

3 years agoRound floats using round(x), not static_cast<int>(x + 0.5)
Benjamin Barenblat [Mon, 7 Feb 2022 16:54:21 +0000 (16:54 +0000)]
Round floats using round(x), not static_cast<int>(x + 0.5)

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/d96e287417766deddbff2d01b96321288c59491e

Adding 0.5 to an IEEE float may cause one bit of precision loss, which
is enough to change the result in certain cases. For example,

    static_cast<int>(std::round(0.49999999999999994)) == 0
    static_cast<int>(0.49999999999999994 + 0.5) == 1

The author works at Google. Upstream applied this patch as Piper
revision 369926519 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name float-rounding.diff

3 years agoCorrect Thumb function bound computation in the symbolizer
Benjamin Barenblat [Mon, 7 Feb 2022 16:54:21 +0000 (16:54 +0000)]
Correct Thumb function bound computation in the symbolizer

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/1ae9b71c474628d60eb251a3f62967fe64151bb2

On 32-bit ARM, all functions are aligned to multiples of two bytes, and
the lowest-order bit in a function’s address is ignored by the CPU when
computing branch targets. That bit is still present in instructions and
ELF symbol tables, though; it’s repurposed to indicate whether the
function contains ARM or Thumb code. If the symbolizer doesn’t ignore
that bit, it will believe Thumb functions have boundaries that are off
by one byte, so instruct the symbolizer to null out the lowest-order bit
after retrieving it from the symbol table.

The author works at Google. Upstream applied this patch as Piper
revision 369254082 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name thumb-function-bounds.diff

3 years agoFix typo in CordRepRing error message
Benjamin Barenblat [Mon, 7 Feb 2022 16:54:21 +0000 (16:54 +0000)]
Fix typo in CordRepRing error message

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/b97a1ecda869ca8754d467a56c50275cebfeb328

The author works at Google. Upstream applied this patch as Piper
revision 367481280 and exported it to GitHub; the Applied-Upstream URL
above points to the exported commit.

Gbp-Pq: Name cordrepring-typo.diff

3 years agoEliminate libabsl_flags.so and libabsl_flags.a
Benjamin Barenblat [Mon, 7 Feb 2022 16:54:21 +0000 (16:54 +0000)]
Eliminate libabsl_flags.so and libabsl_flags.a

Forwarded: not-needed

The libabsl_flags library only contains code when compiling with MSVC, which
Debian doesn't use. Skip compiling absl/flags/flag.cc, and make the Abseil flags
library header-only.

Gbp-Pq: Name empty-flags-library.diff

3 years agoDisable SysinfoTest.NominalCPUFrequency on armel/armhf
Benjamin Barenblat [Mon, 7 Feb 2022 16:54:21 +0000 (16:54 +0000)]
Disable SysinfoTest.NominalCPUFrequency on armel/armhf

NominalCPUFrequency has different behavior on 32-bit and 64-bit ARM
kernels. The Debian arm64 buildds assume they can build 32-bit ARM
packages, but if they do, the NominalCPUFrequency test will fail.
Disable the test when building for 32-bit ARM.

Gbp-Pq: Name arm-multiarch.diff

3 years agoUse libatomic if necessary
Benjamin Barenblat [Mon, 7 Feb 2022 16:54:21 +0000 (16:54 +0000)]
Use libatomic if necessary

Bug-Debian: https://bugs.debian.org/973492

On some architectures, notably armel, Abseil needs symbols defined in
libatomic. Abseil does not currently have a well-developed system to
declare external library dependencies, so just have the linker determine
if anything needs libatomic and add the DT_NEEDED entry where necessary.

Gbp-Pq: Name latomic.diff