Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from abseil:master #1

Open
wants to merge 1,594 commits into
base: master
Choose a base branch
from
Open

Conversation

pull[bot]
Copy link

@pull pull bot commented Aug 18, 2022

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Aug 18, 2022
ezbr and others added 29 commits September 17, 2024 08:23
…t we may change this in the future.

PiperOrigin-RevId: 675576092
Change-Id: Ibbe1d9d2b644ce6f6182a2d197635d6a0c5327f6
…and add a small optimization for early return in AssertNotDebugCapacity.

PiperOrigin-RevId: 675640181
Change-Id: I5ab4cc6eaa0b54932ed70e42ed654f912cf1b099
The existing implementation uses wall-clock time. However, wall clock can drastically differ from the internal system clock, because the system can be suspended and then resumed.

We want to account for at least some kinds of suspensions that might occur during automated testing, such as VM suspension or hypervisor preemption ("steal time"). These are tricky cases, because the physical (host) CPU is still running -- just the logical (guest) virtual CPU isn't. Therefore, we need to ensure that our time measurements exclude elapsed host-only time.

Unfortunately the correctness of a method depends on the nature & configuration of each VM and the guest. For example, it can depend whether RDTSC is virtualized, or on whether the host and guest support accounting for steal time. Windows, for example, appears to only support steal time measurements if the hypervisor is Hyper-V.

Since this is all for the sake of testing, we use a simpler trick that we hope will work around the problem on our systems: we subtract the so-called "interrupt time bias" from the system uptime in Windows. The interrupt time bias includes sleep/hibernation time, and seems to advance during for VM suspensions as well, so it may take care of the problem.

PiperOrigin-RevId: 675654840
Change-Id: I66150b18912175fa72609d3f137e3ea4fee8fc43
The original version of the tests did not reset the VLOG levels between tests, which could lead to false positives. This CL fixes the issue by resetting the VLOG levels to their default values before each test.

PiperOrigin-RevId: 675711787
Change-Id: Id311ba0c00a9e929afcddc7346882487fd64ea16
…ectly removed a more generic one.

### Example:

The user passes `--vmodule=*pipeline*=10` to enable logs in files containing `"pipeline"` in their names:
```
pipeline_a.cc
pipeline_b.cc
pipeline_c.cc
```
Additionally, `pipeline_a.cc` executes `absl::SetVlogLevel("pipeline_a", 10)`.

### Expected behavior:

VLOG level `10` is enabled in all files containing `"pipeline"` in their names. `absl::SetVlogLevel("pipeline_a", 10)` should not affect this, as `pipeline_a.cc` is already covered by `--vmodule=*pipeline*=10` and have the same level there.

### Actual behavior (before the CL):

VLOG level `10` is enabled only in `pipeline_a.cc`. `--vmodule=*pipeline*=10` is ignored.

### Reason:

`absl::SetVlogLevel` is based on `PrependVModuleLocked`. The issue lies in the following code within `PrependVModuleLocked`:

```cc
  // This is a memory optimization to avoid storing patterns that will never
  // match due to exit early semantics. Primarily optimized for our own unit
  // tests.
  get_vmodule_info().erase(
      std::remove_if(++iter, get_vmodule_info().end(),
                     [module_pattern](const VModuleInfo& info) {
                       return FNMatch(info.module_pattern, module_pattern);
                     }),
      get_vmodule_info().cend());
```

When `absl::SetVlogLevel("pipeline_a", 10)` is executed, `get_vmodule_info()` contains `"*pipeline*"`. Therefore, `info.module_pattern` equals to `"*pipeline*"` and `module_pattern` equals to `"pipeline_a"`.

Because `"pipeline_a"` matches the pattern `"*pipeline*"`, the pattern `"*pipeline*"` is erroneously erased. `get_vmodule_info()` then only contains the `"pipeline_a"` pattern.

### Solution:

This CL corrects the order of the arguments in `FNMatch` to:
```cc
FNMatch(module_pattern, info.module_pattern);
```

This ensures that it correctly checks if the new pattern is more general than the previous pattern, but not vice versa.  In the example above, the new pattern `"pipeline_a"` does not match the previous `"*pipeline*"` pattern. Therefore, `get_vmodule_info()` retains both patterns in the following order: `"pipeline_a"`, `"*pipeline*"`.

PiperOrigin-RevId: 675776298
Change-Id: I9550dbd4282e66799619369894b8304856a7a777
PiperOrigin-RevId: 676486501
Change-Id: I874097a85486534150ce4c2f814d20be9d8b3b1f
…ark::DoNotOptimize` on both inputs and outputs and by removing the unnecessary and wrong `ABSL_RAW_CHECK` condition (`check != 0`) of `BM_ByteStringFromAscii_Fail` benchmark.

Relevant comment:
```
// The DoNotOptimize(...) function can be used to prevent a value or
// expression from being optimized away by the compiler. This function is
// intended to add little to no overhead.
// See: http://stackoverflow.com/questions/28287064
//
// The specific guarantees of DoNotOptimize(x) are:
//  1) x, and any data it transitively points to, will exist (in a register or
//     in memory) at the current point in the program.
//  2) The optimizer will assume that DoNotOptimize(x) could mutate x or
//     anything it transitively points to (although it actually doesn't).
//
// To see this in action:
//
//   void BM_multiply(benchmark::State& state) {
//     int a = 2;
//     int b = 4;
//     for (auto s : state) {
//       testing::DoNotOptimize(a);
//       testing::DoNotOptimize(b);
//       int c = a * b;
//       testing::DoNotOptimize(c);
//     }
//   }
//   BENCHMARK(BM_multiply);
//
// Guarantee (2) applied to 'a' and 'b' prevents the compiler lifting the
// multiplication outside of the loop. Guarantee (1) applied to 'c' prevents the
// compiler from optimizing away 'c' as dead code.
```
To see #1 and #2 in action, see: https://godbolt.org/z/ned1578ve

PiperOrigin-RevId: 676588185
Change-Id: I7ed3e4bed8274b54ac7877316f2d82c33d68f00f
…hat fails when we do so.

PiperOrigin-RevId: 676894552
Change-Id: I68619a6ae48e65c7c58466b0be7ec79f5797066c
to verify that AVX can be forced via `gnu::target`.

Fixes #1759

PiperOrigin-RevId: 677853230
Change-Id: Ic69045c71ddf8230fd7b0210ba4aef8693053232
- Compute the escape character values at compile time.
- Use `little_endian::Store32` invariably to write all escaped characters.
- Use 3 slop bytes at the end so that we can safely call `little_endian::Store32` at the end as well.

PiperOrigin-RevId: 677995014
Change-Id: I9d710fff48d0ce0b013e64d726960364c77ea1d7
Saving one "&" operation in the Mutex::Unlock fast path. This has likely no performance impact (the two AND instructions ran in parallel anyway), but is as complex as the current solution, and enables two possible improvements in the future.

1. If bits Ev, Wr, Wa, De are made into the highest bits in the kMuLow,
   then the second "&" operation can be omitted because if kMuWriter is set,
   the there are no readers, so the kMuHigh bits are zero.

2. If the meanings of kMuWriter and kMuDesig are flipped, then the "^"
   operation is not needed either.

PiperOrigin-RevId: 679272590
Change-Id: Iea7a04df0118d2410b7bfdab70b30e33d4b90e43
sure MaskedPointer is trivially copyable and copy constructible.

Fixes #1758

PiperOrigin-RevId: 679618900
Change-Id: Ia0ebacd8bb43b3fe3b9cd654259bef9072cec46c
When Abseil hardening is enabled, this assertion's condition gets evaluated every time an iterator equality check is performed on iterators from a raw_hash_set.  This occurs very frequently when looping over the contents of sets, due to loop conditions like `it != end()`, and causes about 0.4% CPU overhead to some Google workloads.

PiperOrigin-RevId: 681560141
Change-Id: Ia0177cbef7cf67f9f0b6adf2cf55d9a2ed320d2d
…under NDEBUG in C++20

Also fix the old definition by verifying that the condition is contextually convertible to bool.

The new C++20 definition reduces codegen bloat and guarantees fast performance while still retaining the expression (so that unused-variable warnings don't trigger).

As an example where this makes a difference, compare the following snippet under `-DABSL_INTERNAL_CPLUSPLUS_LANG=202002`: https://godbolt.org/z/hjf59n84v
```
#include <stdlib.h>
template<class T> struct S { S() { abort(); } static S const s; };
template<class T> S<T> const S<T>::s = {};
#if ABSL_INTERNAL_CPLUSPLUS_LANG >= 202002L
#define ABSL_ASSERT(expr) (decltype((expr) ? void() : void())())
#else
#define ABSL_ASSERT(expr) (false ? ((expr) ? void() : void()) : void())
#endif
void foo() { ABSL_ASSERT(((void)&S<int>::s, true)); }
```

We see that, in unoptimized builds, code is still generated with the old definition of `ABSL_ASSERT`. Moreover, even under optimizations (with `-O2`), the call to abort() still lingers with the old definition of `ABSL_ASSERT`.

Therefore the extra generated code can affect both compile- and run-time performance.

PiperOrigin-RevId: 681563573
Change-Id: I7fbfadcc7fd198e8e1daf14615c33687f6b23af7
PiperOrigin-RevId: 683715628
Change-Id: If73080e74c69523a458b2992c1f3740879ff097d
This is a followup to the [previous
change](69195d5)
that added the `ABSL_NULLABILITY_COMPATIBLE` attribute macro.

Adding these attributes has the following benefits:

- Clang itself can now diagnose certain nullability errors through the
  `-Wnonnull` and `-Wnullability` warnings.

- The nullability annotations can now also be used on pointers to incomplete
  types, as we have removed the `IsSupportedType` mechanism that used the
  `absl_nullability_compatible` tag to check whether a type is
  nullability-compatible (which only worked for complete types) and instead let
  Clang perform this check through the `ABSL_NULLABILITY_COMPATIBLE` attribute
  (which also works on incomplete types).

PiperOrigin-RevId: 684342145
Change-Id: I94c8affd5be704cb49340058ced177f09ebd83a3
… helpful.

PiperOrigin-RevId: 684499936
Change-Id: Id5901d9d526abdf269f097a293bab6d08850d432
…orks as expected

PiperOrigin-RevId: 684941948
Change-Id: I78a7ae6f4ec8f29e5bed414016eadf2ec95167a4
…used in the hash function.

This fix increases the hash quality of these types.

Also, make sure that absl::(u)int128 have the same hash expansion as their intrinsic counterparts.

PiperOrigin-RevId: 685706878
Change-Id: Ib8e2e2b7a8ce24cf08f1e8d18094188a6eedbb3a
PiperOrigin-RevId: 686110246
Change-Id: I78be07f1c6795d282c3739c54764b1562fd2523c
…h as constexpr.

PiperOrigin-RevId: 686814718
Change-Id: Ia712f4cd24ebf3d02fd0b03cd6973bb53e128682
This allows containers that either optimize based on these
concepts or produce lifetime warnings based on them to
handle absl::Span appropriately. An example is Chromium's
base::span, which warns more aggressively about construction
from rvalues that are not borrowed ranges.

This only has an effect for codebases using C++20. While
many such codebases will presumably also be using std::span
directly, they may use absl::Span for backwards compat, or
compile against libraries that do so.

Also fixes lint's that fired when I tried to edit this.

PiperOrigin-RevId: 688552975
Change-Id: I603e04cd74d60ac6b65754ac73037d7f0ab457fe
Imported from GitHub PR #1777

This patch replaces all instances of

  std::ldexp(msb, 64)

with

  msb * (2**64)

as it turns out that this optimization is not done by MSVC. Worse, it emited a function call with error checking, even if the int128 cannot hit the inf limitation.

Sadly even the constant `std::ldexp(1.0, 64)` is not inlined: https://gcc.godbolt.org/z/oGhGz77sx
Merge a21b1c9 into 8783136

Merging this change closes #1777

COPYBARA_INTEGRATE_REVIEW=#1777 from degasus:int128_t a21b1c9
PiperOrigin-RevId: 688968524
Change-Id: Id88cf38e241553f88bf4d97e7b001247dcd5599b
PiperOrigin-RevId: 688971140
Change-Id: I11283c77c3df8fc9b964bfb58a46211b8783cdb4
either the string ABSL_NAMESPACE_BEGIN or SKIP_ABSL_INLINE_NAMESPACE_CHECK

A lot of files are currently missing one or the other. These will be
updated when the files change (triggering the presubmit on the file)
or though a followup mass update.

PiperOrigin-RevId: 688985640
Change-Id: If2d3f3fcd6b41a7452198ba9de13c8633d6051c6
Imported from GitHub PR #1775

Win32 `dbhelp.h` defines `SYMBOL_INFO` structure under `WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)` guard. Any other partition will have these symbols undefined.

Follow same logic in `symbolize.cc` to prevent compilation failure on non-Desktop platforms.
Merge 0081212 into 8783136

Merging this change closes #1775

COPYBARA_INTEGRATE_REVIEW=#1775 from redbaron:patch-1 0081212
PiperOrigin-RevId: 689022871
Change-Id: If68795b432b3d09b999aa52cb629c5ad2b6eb75c
PiperOrigin-RevId: 689081310
Change-Id: I394b8eb6f87f3ea8e2ebce511baeef132b28d452
…ow temporaries.

`c_find_first_of` does not keep or return references into `options` so there's no reason to require an l-value there.

PiperOrigin-RevId: 690696332
Change-Id: Ibbabb69ba72e9506c0406f2124034a944d6899d6
PiperOrigin-RevId: 691547968
Change-Id: I41055f6840e7d08a5ba239f17e73632abc8f028d
goldvitaly and others added 30 commits February 21, 2025 12:12
…pareInsertNonSooSlow`.

https://gcc.godbolt.org/z/c9onP4qs3 shows a drastic reduction of operations. We can see that the new version fits everything into registers and doesn't have push and pop on stack.

Microbenchmarks are quite positive. Although small tables `InsertManyToEmpty` are slightly slower (<0.5%).
```
BM_SWISSMAP_InsertManyOrdered_Hot<::absl::flat_hash_set, 4>/set_size:1/density:1             42.4 ± 0%            41.2 ± 0%   -2.93%        (p=0.000 n=27+25)
BM_SWISSMAP_InsertManyOrdered_Hot<::absl::flat_hash_set, 4>/set_size:2/density:1             38.1 ± 0%            37.0 ± 0%   -2.91%        (p=0.000 n=26+27)
BM_SWISSMAP_InsertManyOrdered_Hot<::absl::flat_hash_set, 4>/set_size:4/density:1             38.2 ± 0%            37.1 ± 0%   -2.91%        (p=0.000 n=27+25)
BM_SWISSMAP_InsertManyOrdered_Hot<::absl::flat_hash_set, 4>/set_size:8/density:1             35.8 ± 0%            34.7 ± 0%   -3.09%        (p=0.000 n=25+27)
BM_SWISSMAP_InsertManyOrdered_Hot<::absl::flat_hash_set, 4>/set_size:16/density:1            31.6 ± 1%            30.9 ± 1%   -2.40%        (p=0.000 n=26+24)

BM_SWISSMAP_InsertManyUnordered_Hot<::absl::flat_hash_set, 4>/set_size:65536/density:0       29.3 ± 1%            25.6 ± 1%  -12.47%        (p=0.000 n=21+22)
BM_SWISSMAP_InsertManyUnordered_Hot<::absl::flat_hash_set, 4>/set_size:131072/density:0      36.1 ± 1%            31.5 ± 2%  -12.79%        (p=0.000 n=21+22)
BM_SWISSMAP_InsertManyUnordered_Hot<::absl::flat_hash_set, 4>/set_size:262144/density:0      40.8 ± 3%            35.5 ± 3%  -12.89%        (p=0.000 n=24+23)
BM_SWISSMAP_InsertManyUnordered_Hot<::absl::flat_hash_set, 4>/set_size:524288/density:0      43.3 ± 2%            38.2 ± 3%  -11.86%        (p=0.000 n=21+22)
BM_SWISSMAP_InsertManyUnordered_Hot<::absl::flat_hash_set, 4>/set_size:1048576/density:0     44.6 ± 2%            40.6 ±10%   -9.09%        (p=0.000 n=21+21)

BM_SWISSMAP_EraseInsert_Hot<::absl::flat_hash_set, 64>/set_size:1024                          118 ± 1%             115 ± 1%   -2.95%        (p=0.000 n=27+25)
BM_SWISSMAP_EraseInsert_Hot<::absl::flat_hash_set, 64>/set_size:2048                          120 ± 0%             115 ± 1%   -3.46%        (p=0.000 n=24+23)
BM_SWISSMAP_EraseInsert_Hot<::absl::flat_hash_set, 64>/set_size:4096                          122 ± 0%             118 ± 1%   -3.47%        (p=0.000 n=27+27)
BM_SWISSMAP_EraseInsert_Hot<::absl::flat_hash_set, 64>/set_size:8192                          133 ± 1%             129 ± 1%   -3.59%        (p=0.000 n=27+27)
BM_SWISSMAP_EraseInsert_Hot<::absl::flat_hash_set, 64>/set_size:16384                         136 ± 1%             132 ± 1%   -3.22%        (p=0.000 n=27+24)
BM_SWISSMAP_EraseInsert_Hot<::absl::flat_hash_set, 64>/set_size:32768                         138 ± 1%             134 ± 1%   -3.21%        (p=0.000 n=27+25)
BM_SWISSMAP_EraseInsert_Hot<::absl::flat_hash_set, 64>/set_size:65536                         149 ± 2%             144 ± 2%   -3.48%        (p=0.000 n=26+21)

BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:1                       15.0 ± 0%            15.0 ± 1%   +0.25%        (p=0.014 n=22+22)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:2                       28.0 ± 1%            28.1 ± 1%   +0.15%        (p=0.030 n=23+25)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:4                       44.7 ± 1%            44.3 ± 0%   -0.73%        (p=0.000 n=26+25)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:8                       44.9 ± 1%            44.5 ± 1%   -0.86%        (p=0.000 n=24+26)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:16                      53.1 ± 1%            54.0 ± 1%   +1.61%        (p=0.000 n=24+26)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:32                      53.5 ± 2%            54.6 ± 2%   +2.07%        (p=0.000 n=26+26)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:64                      51.5 ± 1%            52.4 ± 2%   +1.77%        (p=0.000 n=24+27)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:128                     49.6 ± 2%            50.0 ± 1%   +0.66%        (p=0.007 n=26+27)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:256                     47.9 ± 2%            47.7 ± 2%     ~           (p=0.084 n=24+27)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:512                     46.8 ± 2%            46.1 ± 2%   -1.49%        (p=0.000 n=26+27)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:1024                    46.5 ± 2%            45.5 ± 1%   -2.12%        (p=0.000 n=26+27)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:2048                    47.8 ± 2%            46.5 ± 2%   -2.75%        (p=0.000 n=25+26)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:4096                    53.9 ± 2%            52.0 ± 1%   -3.60%        (p=0.000 n=26+26)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:8192                    62.1 ± 1%            59.8 ± 1%   -3.62%        (p=0.000 n=27+27)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:16384                   64.8 ± 1%            62.5 ± 1%   -3.51%        (p=0.000 n=27+25)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:32768                   66.1 ± 1%            63.6 ± 1%   -3.71%        (p=0.000 n=27+27)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:65536                   67.6 ± 1%            65.0 ± 1%   -3.82%        (p=0.000 n=27+26)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:131072                  69.4 ± 1%            66.4 ± 1%   -4.28%        (p=0.000 n=27+25)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:262144                  72.2 ± 2%            68.4 ± 2%   -5.26%        (p=0.000 n=27+26)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:524288                  76.1 ± 2%            71.6 ± 2%   -5.96%        (p=0.000 n=27+27)
BM_SWISSMAP_InsertManyToEmpty_Hot<::absl::flat_hash_set, 4>/set_size:1048576                 80.9 ± 2%            76.2 ± 6%   -5.89%        (p=0.000 n=26+23)
```

PiperOrigin-RevId: 729614125
Change-Id: I2d36fddaa02d21572f6928dc148b8e2f1c2b159f
…pr class member

This [was deprecated in C++17](https://timsong-cpp.github.io/cppwp/std17/depr.static_constexpr), and Abseil doesn't support older versions of the language.

PiperOrigin-RevId: 729620980
Change-Id: I5e91feb3df8317e2cf69f9363c923ac7b49e6aff
…ay be

referenced after it is destroyed. While the string does live until the end of
the full statement, logging (previously occurred) in the destructor of the
`LogMessage` which may be constructed before the temporary string (and thus
destroyed after the temporary string's destructor).

This change moves logging to occur inside the internal `Voidify`. This does not
affect when logging occurs relative to any other observable, other than the
fact that it runs later than any temporary destructors in the log statement.

PiperOrigin-RevId: 729708145
Change-Id: I9b90367d7a5f4ed3cf091d4d33756262acc03ec6
Motivations:
1) raw_hash_set is becoming too big and hard to work with.
2) I have an experiment to use Group::Bitmask in policy traits and need this code to be available as a smaller library to avoid circular dependency.

Additionally added BitMask and NonIterableBitmask aliases inside of the group in order to be able to use these types as function arguments (needed for an ongoing experiment).

PiperOrigin-RevId: 729748373
Change-Id: Ie0aef40aa3d8dc7fe8ae27cc7808eacfa1a37319
prior to C++17. `absl::optional` is now an alias for `std::optional`.
It is recommended that clients simply use `std::optional`.

PiperOrigin-RevId: 729860560
Change-Id: I8f3a23ed46c451cb441771cc544df79e6c326b67
Abseil does not support language versions older than C++ 17 anymore.

PiperOrigin-RevId: 730141116
Change-Id: Ie527272533321ce8098c086a833b47cac34e4bc0
Abseil doesn't support anything older than C++17 anymore. Calling out earlier versions of the language does not make sense.

PiperOrigin-RevId: 730150983
Change-Id: I0b1b3cb36dc31a6645509fdedc411e427e36a371
PiperOrigin-RevId: 730223619
Change-Id: I0e4712477cfbf4b45cb069ebb9d479d27b5767e5
PiperOrigin-RevId: 730505454
Change-Id: Id3f2690675d2bf4709e5ea3a4d2f0d8b074fb7b4
Closes #1762

PiperOrigin-RevId: 730514635
Change-Id: I33aa7140a457a81bf7b0f878854fbc127258c439
PiperOrigin-RevId: 730515423
Change-Id: Ic5a5f0881bfc532f10da35a0e038875d587ac2b8
…ut is guaranteed to be >32 in length.

Also delete LowLevelHash() since it's unused outside of tests.

PiperOrigin-RevId: 730596087
Change-Id: I6887c778de0e847ca4e6691ac5b3325f7106a5d7
These are integer-type shortening warnings.
These warnings are still disabled in tests.

c4244: conversion from 'type1' to 'type2', possible loss of data
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-levels-3-and-4-c4244?view=msvc-170
c4267: conversion from 'size_t' to 'type', possible loss of data
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4267?view=msvc-170

Fixes #1844

PiperOrigin-RevId: 730882892
Change-Id: Id6506d71846caf1a6a5be3375c34266299c221e1
prior to C++17. `absl::variant` is now an alias for `std::variant`.
It is recommended that clients simply use `std::variant`.

PiperOrigin-RevId: 730940936
Change-Id: I7157612a62eec036abf61dd1ad42c5945afeac1d
According to https://bazel.build/remote/caching#known-issues and
bazelbuild/bazel#4558 this is better
since these needs to be taken into account for the cache key.

PiperOrigin-RevId: 730947060
Change-Id: I0e27368e29fab5f6583e32a779fe84f0070b0d14
Imported from GitHub PR #1846

Currently getting the following compilation error:
```
 error: uninitialized 'const kGolden' [-fpermissive]
```
Merge d91fffa into 52190ca

Merging this change closes #1846

COPYBARA_INTEGRATE_REVIEW=#1846 from miladfarca:fix-be d91fffa
PiperOrigin-RevId: 731041395
Change-Id: Ibee7f5b04ec4e3c5e249321128c0ab46179c5b71
which were only needed prior to C++17. It is recommended that
clients simply use std::apply and std::make_from_tuple.

PiperOrigin-RevId: 731348450
Change-Id: I7711487c869e229f86304da43272fbade9f7301a
In this change, //absl/status is intentionally excluded because of
complication with SWIG compatibility. This may be handled separately.

PiperOrigin-RevId: 731387819
Change-Id: I71bf2e02f3a477d65575d467f5e5ab163846d31e
These two changes are bundled together in order to simplify and improve table size overflow verification.
1. We verify use input directly without any transformation that may cause overflow.
2. Verification for 64 bit platform doesn't require division anymore.
3. We also leave the room for using extra bits in size for metadata (for ongoing experiment with storing seed in the size).

PiperOrigin-RevId: 731394588
Change-Id: I0c4336d945f86d74dc64ad67171e176efd1cdd80
Limiting `slot_size` may subtly break workflows with seemingly irrelevant changes.

PiperOrigin-RevId: 731443006
Change-Id: I458610d280c99f773b0a957bb8f3d6d00529551a
them to their std equivalents. It is recommended that clients now
simple use the std equivalents.

PiperOrigin-RevId: 731931492
Change-Id: I1f204dd659f12c4d9cc183f230ce13052a523625
…to the table.

PiperOrigin-RevId: 732959065
Change-Id: Icfc2a2dad2c0be816485af605ad13bf1cb6dd11b
The overflow can happen during rollback after a parsing
failure, where the null terminator is written without
verifying the buffer bounds.

Credit to www.code-intelligence.com for reporting this issue

PiperOrigin-RevId: 732995553
Change-Id: Ic5075f53e510d270e1784d593defcd53f9121d02
…rom aliases.

PiperOrigin-RevId: 733063284
Change-Id: If0af60b24bcc59b6fe3a6882aebd427b8b10f3a0
…ger.

PiperOrigin-RevId: 733331540
Change-Id: Ia77f89dfbd58fa2845c89af68976b965852d7e18
Applying a non-zero offset to a null pointer is undefined behavior.

Our UBSAN tests were missing `-fno-sanitize-recover`, which
means UBSAN logs a warning, but the program continues,
causing the test not to fail.

`-fno-sanitize-recover` will be added once all errors are fixed.

PiperOrigin-RevId: 733395060
Change-Id: Ibf71d0d2a27fac14f0c33dbdf83f4089645b8b37
Passing null to memcpy or memset is undefined behavior.
Our UBSAN tests were missing `-fno-sanitize-recover`, which
means UBSAN logs a warning, but the program continues,
causing the test not to fail.

`-fno-sanitize-recover` will be added once all errors are fixed.

PiperOrigin-RevId: 733395230
Change-Id: I5477507999c4c67e53ab4cf40547b17b92d478b4
Invalid enum values are undefined behavior. This change
makes the enum backed by an integer for testing.

Our UBSAN tests were missing `-fno-sanitize-recover`, which
means UBSAN logs a warning, but the program continues,
causing the test not to fail.

`-fno-sanitize-recover` will be added once all errors are fixed.

PiperOrigin-RevId: 733445015
Change-Id: Ie31fe1d06520d91dfe291b4488fe3d4ca29c72c0
Invalid enum values are undefined behavior. This change
makes the enum backed by an integer for testing.

Our UBSAN tests were missing `-fno-sanitize-recover`, which
means UBSAN logs a warning, but the program continues,
causing the test not to fail.

`-fno-sanitize-recover` will be added once all errors are fixed.

PiperOrigin-RevId: 733450563
Change-Id: I0644af2ecb9ca6def5fa0c9c948d76dda54af97f
Passing null to memcpy is undefined behavior.

Our UBSAN tests were missing `-fno-sanitize-recover`, which
means UBSAN logs a warning, but the program continues,
causing the test not to fail.

`-fno-sanitize-recover` will be added once all errors are fixed.

PiperOrigin-RevId: 733466239
Change-Id: I9c2a2348638b78465b6d0880c93c11ba89a93efd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.