Fix sanitizer regressions in sparse serializer and packet tests

libeigen/eigen!2319

Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
This commit is contained in:
Rasmus Munk Larsen
2026-03-22 09:10:16 -07:00
parent 835e5615a9
commit 6490b17e6f
7 changed files with 129 additions and 52 deletions

View File

@@ -182,7 +182,7 @@ void test_stress_runqueue() {
}));
for (int i = 0; i < 2; i++) {
threads.emplace_back(new std::thread([&q, &total]() {
int sum = 0;
int64_t sum = 0;
for (int j = 1; j < kEvents; j++) {
if (q.PushBack(j) == 0) {
sum += j;
@@ -194,7 +194,7 @@ void test_stress_runqueue() {
total += sum;
}));
threads.emplace_back(new std::thread([&q, &total]() {
int sum = 0;
int64_t sum = 0;
std::vector<int> stolen;
for (int j = 1; j < kEvents;) {
if (q.PopBackHalf(&stolen) == 0) {