Repository navigation
DX tooling: sanitizer presets and CI, sccache, pinned deps, devcontainer; fix sanitizer findings #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
DX tooling: sanitizer presets and CI, sccache, pinned deps, devcontainer; fix sanitizer findings #75
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
f711cfa
build: pin bzip2 and jansson instead of tracking master
Segfaultd 66db7ab
build: add sanitizer option, compiler cache detection and presets
Segfaultd c6a382a
fix(core): do not memcpy from a null password
Segfaultd c8c7d4d
fix(core): make thread lifecycle flags and the lockless counter atomic
Segfaultd b5c4dbf
chore: add editorconfig, clangd/clang-tidy config, devcontainer and D…
Segfaultd 17fe6f4
test: reach RakPeer internals through pointers-to-member, not downcasts
Segfaultd fcb1765
fix(core): release runThreadsMutex in ThreadPool::Clear when not running
Segfaultd 867f7ca
ci: add sanitizer jobs and sccache
Segfaultd 996e010
fix: MSVC lambda capture in LocklessUint32 test; baseline SlotInspect…
Segfaultd a42944b
test: give each FileListDirectory test its own temp directory
Segfaultd f567b16
test: check ThreadPool's lock with TryLock instead of a deadline
Segfaultd b43abf2
ci: fail sanitizer jobs on a report from any retried attempt; bound u…
Segfaultd 99fc7a0
ci: fail the sanitizer report check when the ctest log is missing
Segfaultd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # clang-tidy checks for MafiaNet, read by clangd (inline diagnostics) and by | ||
| # `run-clang-tidy -p build/<preset>`. Focused on correctness plus the | ||
| # mechanical modernizations clang-tidy can fix on its own. Not a CI gate: on | ||
| # the legacy tree it would drown the signal. | ||
| --- | ||
| Checks: > | ||
| -*, | ||
| bugprone-*, | ||
| performance-*, | ||
| modernize-use-override, | ||
| modernize-use-nullptr, | ||
| modernize-use-using, | ||
| modernize-use-equals-default, | ||
| modernize-use-equals-delete, | ||
| modernize-use-bool-literals, | ||
| modernize-loop-convert, | ||
| modernize-use-emplace, | ||
| cppcoreguidelines-pro-type-member-init, | ||
| cppcoreguidelines-virtual-class-destructor, | ||
| readability-redundant-control-flow, | ||
| readability-redundant-string-init, | ||
| -bugprone-easily-swappable-parameters, | ||
| -bugprone-narrowing-conversions, | ||
| -bugprone-reserved-identifier, | ||
| -performance-no-int-to-ptr, | ||
| -performance-enum-size | ||
|
|
||
| # Diagnostics only. | ||
| WarningsAsErrors: '' | ||
|
|
||
| # Only diagnose project headers, not fetched third-party dependencies. | ||
| HeaderFilterRegex: 'Source/(include|src)/.*' | ||
|
|
||
| FormatStyle: none |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # clangd reads compile_commands.json from the `debug` preset's build tree | ||
| # (cmake --preset debug). Point it elsewhere locally with a user config if you | ||
| # work from another preset. | ||
| CompileFlags: | ||
| CompilationDatabase: build/debug |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| // Linux development container. Mainly for working on the Linux-only batched | ||
| // datagram paths (recvmmsg/sendmmsg) and running the sanitizer presets from a | ||
| // macOS or Windows host: open the folder in VS Code / Codespaces, then | ||
| // `cmake --workflow --preset debug` (or asan / tsan). | ||
| { | ||
| "name": "MafiaNet", | ||
| "image": "mcr.microsoft.com/devcontainers/cpp:1-ubuntu-24.04", | ||
| // ptrace for gdb; the default seccomp profile also blocks the personality() | ||
| // call TSan uses to disable ASLR. | ||
| "runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"], | ||
| "postCreateCommand": "sudo apt-get update && sudo apt-get install -y --no-install-recommends libssl-dev clang clangd clang-tidy ccache", | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "llvm-vs-code-extensions.vscode-clangd", | ||
| "ms-vscode.cmake-tools", | ||
| "vadimcn.vscode-lldb" | ||
| ], | ||
| "settings": { | ||
| "cmake.useCMakePresets": "always", | ||
| "C_Cpp.intelliSenseEngine": "disabled" | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # EditorConfig -- https://editorconfig.org | ||
| # Mirrors .clang-format. No end_of_line: the tree mixes CRLF and LF files, and | ||
| # forcing either would rewrite whole files on save. | ||
| root = true | ||
|
|
||
| [*] | ||
| charset = utf-8 | ||
| insert_final_newline = true | ||
| trim_trailing_whitespace = true | ||
|
|
||
| [*.{c,cpp,cc,cxx,h,hpp,hxx,inl}] | ||
| indent_style = tab | ||
| indent_size = 4 | ||
| tab_width = 4 | ||
|
|
||
| [{CMakeLists.txt,*.cmake,CMakePresets.json}] | ||
| indent_style = space | ||
| indent_size = 4 | ||
|
|
||
| [*.{yml,yaml,json}] | ||
| indent_style = space | ||
| indent_size = 2 | ||
|
|
||
| [*.{md,rst}] | ||
| indent_style = space | ||
| trim_trailing_whitespace = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # GitHub Actions and the docs toolchain. The CMake FetchContent pins | ||
| # (cmake/Fetch*.cmake, Tests/CMakeLists.txt) are not covered by Dependabot and | ||
| # are bumped by hand. | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: github-actions | ||
| directory: / | ||
| schedule: | ||
| interval: monthly | ||
| groups: | ||
| actions: | ||
| patterns: ["*"] | ||
|
|
||
| - package-ecosystem: pip | ||
| directory: /docs | ||
| schedule: | ||
| interval: monthly | ||
| groups: | ||
| docs: | ||
| patterns: ["*"] | ||
|
|
||
| - package-ecosystem: docker | ||
| directory: / | ||
| schedule: | ||
| interval: monthly |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.