Compare commits
2 Commits
452007e079
...
aa5dbb2887
Author | SHA1 | Date | |
---|---|---|---|
aa5dbb2887 | |||
ea76e04cda |
@@ -523,7 +523,7 @@ template <class ConflictSetImpl> struct TestDriver {
|
||||
explicit TestDriver(const uint8_t *data, size_t size)
|
||||
: arbitrary({data, size}) {}
|
||||
|
||||
int64_t writeVersion = 0;
|
||||
int64_t writeVersion = 1000;
|
||||
int64_t oldestVersion = 0;
|
||||
ConflictSetImpl cs{oldestVersion};
|
||||
ReferenceImpl refImpl{oldestVersion};
|
||||
@@ -545,7 +545,7 @@ template <class ConflictSetImpl> struct TestDriver {
|
||||
{
|
||||
int numPointWrites = arbitrary.bounded(100);
|
||||
int numRangeWrites = arbitrary.bounded(100);
|
||||
int64_t v = ++writeVersion;
|
||||
int64_t v = (writeVersion += arbitrary.bounded(10));
|
||||
auto *writes =
|
||||
new (arena) ConflictSet::WriteRange[numPointWrites + numRangeWrites];
|
||||
auto keys = set<std::string_view>(arena);
|
||||
@@ -605,8 +605,8 @@ template <class ConflictSetImpl> struct TestDriver {
|
||||
|
||||
refImpl.addWrites(writes, numPointWrites + numRangeWrites, v);
|
||||
|
||||
oldestVersion = std::max<int64_t>(writeVersion - arbitrary.bounded(10),
|
||||
oldestVersion);
|
||||
oldestVersion =
|
||||
std::min(writeVersion - 10, oldestVersion + arbitrary.bounded(10));
|
||||
cs.setOldestVersion(oldestVersion);
|
||||
refImpl.setOldestVersion(oldestVersion);
|
||||
}
|
||||
|
@@ -71,12 +71,12 @@ struct __attribute__((__visibility__("default"))) ConflictSet {
|
||||
/** `writes` must be sorted ascending, and must not have adjacent or
|
||||
* overlapping ranges. Reads intersecting writes where readVersion <
|
||||
* `writeVersion` will result in `Conflict` (or `TooOld`, eventually).
|
||||
* `writeVersion` must be greater than every write version in all previous
|
||||
* calls to `addWrites` */
|
||||
* `writeVersion` must be greater than or equal to all previous write
|
||||
* versions. */
|
||||
void addWrites(const WriteRange *writes, int count, int64_t writeVersion);
|
||||
|
||||
/** Reads where readVersion < oldestVersion will result in `TooOld`. Must be
|
||||
* greater than any previous oldestVersion */
|
||||
* greater than or equal to all previous oldest versions. */
|
||||
void setOldestVersion(int64_t oldestVersion);
|
||||
|
||||
/** Reads where readVersion < oldestVersion will result in `TooOld`. There are
|
||||
@@ -160,14 +160,14 @@ void ConflictSet_check(const ConflictSet *cs,
|
||||
/** `writes` must be sorted ascending, and must not have adjacent or
|
||||
* overlapping ranges. Reads intersecting writes where readVersion <
|
||||
* `writeVersion` will result in `Conflict` (or `TooOld`, eventually).
|
||||
* `writeVersion` must be greater than all write versions in all previous
|
||||
* calls to `addWrites` */
|
||||
* `writeVersion` must be greater than or equal to all previous write versions.
|
||||
*/
|
||||
void ConflictSet_addWrites(ConflictSet *cs,
|
||||
const ConflictSet_WriteRange *writes, int count,
|
||||
int64_t writeVersion);
|
||||
|
||||
/** Reads where readVersion < oldestVersion will result in `TooOld`. Must be
|
||||
* greater than any previous oldestVersion */
|
||||
* greater than or equal to all previous oldest versions. */
|
||||
void ConflictSet_setOldestVersion(ConflictSet *cs, int64_t oldestVersion);
|
||||
|
||||
/** Reads where readVersion < oldestVersion will result in `TooOld`. There are
|
||||
|
@@ -176,7 +176,7 @@ keywords = {data structures, searching, trees}
|
||||
}
|
||||
|
||||
@misc{ubsan,
|
||||
title = {Undefined Behaviort Sanitizer},
|
||||
title = {UndefinedBehaviorSanitizer — Clang 19.0.0git documentation},
|
||||
howpublished = {\url{https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html}},
|
||||
note = {Accessed: 2024-04-19}
|
||||
}
|
||||
|
@@ -226,6 +226,8 @@ This code is not straightforward, so exercising it from only a manually written
|
||||
|
||||
\section{Conclusion}
|
||||
|
||||
% https://www.reddit.com/r/LaTeX/comments/9d9u97/some_reference_get_weird_space_between_them_when/
|
||||
\raggedright
|
||||
\printbibliography
|
||||
|
||||
\end{document}
|
||||
|
Reference in New Issue
Block a user