Original code comment says
"there's no hard guarantee about the above equality and the result could vary by platform, malloc implementation, and tooling instrumentation (e.g. ASAN, valgrind)"
Therefore, we should remove the assertion on UB. Since removal of the UB makes the rest of the test case
less meaningful, we commented out the entire test case.
Furthermore, we have a case in which, even without ASAN or other instrumentation, e.g. Valgrind, etc, the equality does not hold.
Profile: team
Commit hash: 3164cadc6f
Command: devRetryCorrectnessTest bin/fdbserver -r simulation -f tests/fast/RandomUnitTests.toml -s 3939330597 -b on --crash --trace_format json
* Enable secure allocation mode in Arena
This mode allows zeroing out blocks holding sensitive data after use
* Introduce WipedString to all token-holding memory
Also introduce a option flag "sensitive"
* Make pointer equivalency a hard requirement for non-ASAN builds
So that we can detect when Arena/malloc/memory-wipe behavior changes
Narrow the self-reference ASSERT in ArenaBlock::dependOn to only
the cases where we're trying to make a reference from self -> other.
It's allowed for self.getPtr() to be null, in which case we create
the ArenaBlock anew and there's no danger of self-reference.
Fixes Issue #8869.
The intent is to have one ArenaBlock live at least at long as another. If they're
the same, that's accomplished without doing any additional bookkeeping.
It introduces a cycle in the `next` pointers in the ArenaBlockRef's,
which results in infinite recursion as we follow them in `getTotalSize`.
This doesn't fix the underlying problem, but gives a better failure
than a stack overflow.
* Allocate at least sizeof(ArenaBlock) for an ArenaBlock
* Fix message pack unit test
Previously we were using only the 4 least significan bits as the length
of a message pack string, but it should be 5 according to https://github.com/msgpack/msgpack/blob/master/spec.md#str-format-family
* Add contrib/debug_determinism
Add an instrumentation-based technique for debugging unseen mismatches. Also guard a few existing sources of nondeterminism that don't affect unseen with the DEBUG_DETERMINISM macro.
Also change the simulated run loop to not run as the only task inside the real run loop, since that was a source of nondeterminism.
Also fix nondeterminism from calling timer_int
* Add StorageMetadataType::currentTime
Basically a deterministic-in-simulation version of timer_int that we can
use instead of timer_int for StorageMetadataType::createdTime