mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2026-05-02 11:49:33 +03:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a0cbe2daf6 | |||
| 59f19f1a12 | |||
| 9fbe3d7488 | |||
| 325b76e463 | |||
| 6bbb2b5e07 | |||
| 98264709fb | |||
| 427ada239f | |||
| 98940d339d | |||
| 7c79333026 | |||
| 3f372db86d | |||
| 068330b24b | |||
| a0d16dd2e8 | |||
| 9a42563bbc | |||
| 7d86756e72 | |||
| e247cf0513 | |||
| a247e3ecdc | |||
| 61b920f957 | |||
| 290f125abc | |||
| 93bf90ba95 | |||
| 5b356616a7 |
@@ -0,0 +1,80 @@
|
||||
name: Sanitizer
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
run_sanitizer:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sanitizer:
|
||||
- "address,leak,undefined"
|
||||
- "thread,undefined"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt-get -y install cmake gcc g++ ninja-build libncurses5-dev libreadline-dev libsodium-dev libssl-dev make zlib1g-dev liblz4-dev libnl-genl-3-dev
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-O1 -fsanitize=${{ matrix.sanitizer }} -fno-omit-frame-pointer" ..
|
||||
cmake --build .
|
||||
|
||||
- name: Test
|
||||
env:
|
||||
ASAN_OPTIONS: halt_on_error=0:exitcode=0
|
||||
TSAN_OPTIONS: halt_on_error=0:exitcode=0:suppressions=./tsan_suppressions.txt
|
||||
UBSAN_OPTIONS: halt_on_error=0:exitcode=0
|
||||
LSAN_OPTIONS: exitcode=0
|
||||
run: |
|
||||
.ci/vpntools-check.sh 2> sanitizer.log
|
||||
|
||||
- name: Make job summary
|
||||
run: |
|
||||
echo "### Sanitizer Report (${{ matrix.sanitizer }})" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
REPORTS=$(grep -E "SUMMARY:|runtime error:" sanitizer.log | sort | uniq)
|
||||
REPORT_COUNT=$(echo "$REPORTS" | grep -c . || true)
|
||||
echo "Found $REPORT_COUNT issues" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
echo "<details><summary>View Summary</summary>" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|
||||
echo "$REPORTS" >> $GITHUB_STEP_SUMMARY
|
||||
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "</details>" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
if [ "$REPORT_COUNT" -ne 0 ]; then
|
||||
echo "HAS_ISSUES=true" >> $GITHUB_ENV
|
||||
echo "REPORT_COUNT=$REPORT_COUNT" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Upload full sanitizer log
|
||||
if: env.HAS_ISSUES == 'true'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sanitizer-logs-${{ matrix.sanitizer }}
|
||||
path: |
|
||||
sanitizer.log
|
||||
retention-days: 30
|
||||
|
||||
- name: Fail on sanitizer issues
|
||||
if: env.HAS_ISSUES == 'true'
|
||||
run: |
|
||||
echo "Found ${{ env.REPORT_COUNT }} issues."
|
||||
echo "Please check the Job Summary page for a quick overview."
|
||||
echo "Full logs are available in the GitHub Artifacts."
|
||||
exit 1
|
||||
Generated
+1258
-178
File diff suppressed because it is too large
Load Diff
@@ -1849,6 +1849,8 @@ void UnixUnlockEx(LOCK *lock, bool inner)
|
||||
}
|
||||
|
||||
// Lock
|
||||
// Recursive locking is implemented manually instead of using PTHREAD_MUTEX_RECURSIVE.
|
||||
// See: https://github.com/SoftEtherVPN/SoftEtherVPN/pull/2219
|
||||
bool UnixLock(LOCK *lock)
|
||||
{
|
||||
pthread_mutex_t *mutex;
|
||||
|
||||
+8
-6
@@ -1203,10 +1203,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"version": "3.1.5",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
|
||||
"integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
@@ -1334,10 +1335,11 @@
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/picomatch": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
|
||||
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
|
||||
"integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8.6"
|
||||
},
|
||||
|
||||
+1
-1
Submodule src/libhamcore updated: 2951ae5b61...fb8d49782a
@@ -17,6 +17,20 @@ race_top:BindConnectThreadForIPv4
|
||||
race_top:BindConnectThreadForIPv6
|
||||
race_top:BindConnectEx5
|
||||
|
||||
# Thread Sanitizer reports data races on PoolHalting in THREAD, shared between ThreadPoolProc and WaitThread.
|
||||
# But if WaitThread reads false, synchronization is ensured by Wait from the PoolWaitList. If it reads true,
|
||||
# WaitThread simply returns.
|
||||
race_top:ThreadPoolProc
|
||||
|
||||
|
||||
## Accept/Disconnect cancellation
|
||||
# Thread Sanitizer reports two data races on CancelAccept and CallingThread in SOCK, shared between
|
||||
# Accept(Accept6) and Disconnect. These are used when interrupting an Accept operation from a Disconnect.
|
||||
# They are race-safe because they work correctly even if both fields have old values.
|
||||
race_top:^Accept$
|
||||
race_top:^Accept6$
|
||||
race_top:^Disconnect$
|
||||
|
||||
|
||||
## Manual PTHREAD_MUTEX_RECURSIVE
|
||||
# The Lock/Unlock mechanism on Unix is a manual, hand-coded implementation of PTHREAD_MUTEX_RECURSIVE.
|
||||
|
||||
Reference in New Issue
Block a user