Compare commits
2
Commits
f947d883e7
...
3a82d90914
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a82d90914 | ||
|
|
0921d8fedf |
+14
-2
@@ -149,7 +149,11 @@ jobs:
|
||||
- name: Test
|
||||
run: |
|
||||
cd build
|
||||
ctest --no-compress-output --test-output-size-passed 100000 --test-output-size-failed 100000 -T Test -j "$(nproc)" --timeout 90 > /dev/null
|
||||
# On arm64, valgrind needs the MAKE_MEM_DEFINED client requests for
|
||||
# https://git.weaselab.dev/weaselab/conflict-set/issues/39, but this
|
||||
# build has -DNVALGRIND, which compiles them out. Skip valgrind
|
||||
# tests here; they run annotated in the test job.
|
||||
ctest --no-compress-output --test-output-size-passed 100000 --test-output-size-failed 100000 ${{ matrix.arch == 'arm64' && '-E valgrind' || '' }} -T Test -j "$(nproc)" --timeout 90 > /dev/null
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
@@ -176,7 +180,15 @@ jobs:
|
||||
dest="minio/jenkins/conflict-set/${{ gitea.run_number }}/release-${{ matrix.arch }}/"
|
||||
zstd build/Testing/*/Test.xml
|
||||
mc cp build/Testing/*/Test.xml.zst "$dest"
|
||||
mc cp build/*.deb build/*.rpm "$dest"
|
||||
# This step runs even when a previous step failed, to upload test
|
||||
# results. The packages may never have been built though, so skip
|
||||
# them if they're missing.
|
||||
if compgen -G "build/*.deb" > /dev/null; then
|
||||
mc cp build/*.deb "$dest"
|
||||
fi
|
||||
if compgen -G "build/*.rpm" > /dev/null; then
|
||||
mc cp build/*.rpm "$dest"
|
||||
fi
|
||||
if compgen -G "paper/*.pdf" > /dev/null; then
|
||||
mc cp paper/*.pdf "$dest"
|
||||
fi
|
||||
|
||||
+12
-3
@@ -383,9 +383,18 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR AND BUILD_TESTING)
|
||||
if(NOT CMAKE_CROSSCOMPILING)
|
||||
find_program(HARDENING_CHECK hardening-check)
|
||||
if(HARDENING_CHECK)
|
||||
add_test(NAME hardening_check
|
||||
COMMAND ${HARDENING_CHECK} $<TARGET_FILE:${PROJECT_NAME}>
|
||||
--nofortify --nostackprotector)
|
||||
# Control flow integrity (CET) is x86-only and branch protection (PAC/BTI)
|
||||
# is arm64-only, so ignore whichever doesn't apply.
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64 OR CMAKE_SYSTEM_PROCESSOR
|
||||
STREQUAL arm64)
|
||||
set(hardening_check_arch_flags --nocfprotection)
|
||||
else()
|
||||
set(hardening_check_arch_flags --nobranchprotection)
|
||||
endif()
|
||||
add_test(
|
||||
NAME hardening_check
|
||||
COMMAND ${HARDENING_CHECK} $<TARGET_FILE:${PROJECT_NAME}> --nofortify
|
||||
--nostackprotector ${hardening_check_arch_flags})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
+28
-2
@@ -52,6 +52,14 @@ limitations under the License.
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __SANITIZE_ADDRESS__
|
||||
#if defined(__has_feature)
|
||||
#if __has_feature(address_sanitizer)
|
||||
#define __SANITIZE_ADDRESS__
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <memcheck.h>
|
||||
|
||||
using namespace weaselab;
|
||||
@@ -2246,6 +2254,13 @@ bool checkMaxBetweenExclusiveImpl(Node3 *n, int begin, int end,
|
||||
mask |= inBounds(self->index[i]) << i;
|
||||
}
|
||||
mask &= (1 << self->numChildren) - 1;
|
||||
#ifdef __aarch64__
|
||||
// The bits surviving the mask above don't derive from uninitialized slots,
|
||||
// but clang 21+ on aarch64 lowers inBounds through flags+csel, which
|
||||
// memcheck models imprecisely, tainting bits the mask provably clears.
|
||||
// https://git.weaselab.dev/weaselab/conflict-set/issues/39
|
||||
VALGRIND_MAKE_MEM_DEFINED(&mask, sizeof(mask));
|
||||
#endif
|
||||
if (!mask) {
|
||||
return true;
|
||||
}
|
||||
@@ -2257,7 +2272,13 @@ bool checkMaxBetweenExclusiveImpl(Node3 *n, int begin, int end,
|
||||
compared |= (self->childMaxVersion[i] > readVersion) << i;
|
||||
}
|
||||
|
||||
return !(compared & mask) && firstRangeOk;
|
||||
uint32_t compared_masked = compared & mask;
|
||||
#ifdef __aarch64__
|
||||
// Same imprecise csel modeling as above.
|
||||
// https://git.weaselab.dev/weaselab/conflict-set/issues/39
|
||||
VALGRIND_MAKE_MEM_DEFINED(&compared_masked, sizeof(compared_masked));
|
||||
#endif
|
||||
return !compared_masked && firstRangeOk;
|
||||
}
|
||||
|
||||
template <bool kAVX512>
|
||||
@@ -3048,7 +3069,12 @@ Node *firstGeqPhysical(Node *n, const TrivialSpan key) {
|
||||
#define MUSTTAIL
|
||||
#endif
|
||||
|
||||
#if __has_attribute(preserve_none)
|
||||
// ASan + preserve_none miscompiles the continuation chains on aarch64 with
|
||||
// every clang tested (20, 21, trunk 22). The chains work with the default
|
||||
// calling convention, so use that under ASan on aarch64.
|
||||
// https://git.weaselab.dev/weaselab/conflict-set/issues/38
|
||||
#if __has_attribute(preserve_none) && \
|
||||
!(defined(__aarch64__) && defined(__SANITIZE_ADDRESS__))
|
||||
#define PRESERVE_NONE __attribute__((preserve_none))
|
||||
#else
|
||||
#define PRESERVE_NONE
|
||||
|
||||
Reference in New Issue
Block a user