Feature/cpuinfo - #176
Merged
DigitalInBlue merged 13 commits intoAug 12, 2026
Merged
Conversation
Guard against a null problemSpace in ExperimentResult accessors (Value, Iterations, UsPerCall, UnitsPerSecond) to avoid dereferencing null pointers; return sensible defaults when absent. Add unit tests (and include them in test CMake) that validate null-safety and preserve behavior with a valid problemSpace.
Add null checks for fopen("/proc/self/status") and return -1 on failure to avoid dereferencing a null FILE* in GetRAMPhysicalUsedByCurrentProcess, GetRAMPhysicalUsedByCurrentProcessPeak, and GetRAMVirtualUsedByCurrentProcess. This prevents crashes when the status file cannot be opened.
Guard against dereferencing null pointers by: - Returning nullptr when an experiment lookup by name fails. - Early-returning from executor when an experiment's benchmark is null. - Checking for null user-defined-measurement collectors before iterating. These checks prevent crashes when optional/absent objects are encountered during runtime and make code paths null-safe.
…ivision-by-zero in rate calc, and add macOS RAM usage via host_statistics64 Add mutex protection around global experiment/result callback vectors to make registration and invocation safe from concurrent access. Simplify Archive result loading by using operator>> in the loop condition to avoid eof/tellg misuse. Cache us-per-call and check for non-positive values before computing calls-per-second to avoid division-by-zero. On macOS, use host_statistics64 (with mach_host_self) and page counts to compute system RAM used, and include the necessary mach header.
… available pagefile - Correct spelling of "Available tests" in CLI output. - Use std::next when advancing histogram iterators to simplify and clarify code. - Cache fixture created from factory to avoid multiple Create() calls and repeated construction. - Fix ExperimentResult::getRAM return type to int64_t to match signature. - Return available page file (ullAvailPageFile) instead of total page file for virtual available RAM calculation. These are small correctness and clarity fixes; no behavior changes beyond correcting reported values and eliminating redundant object creation.
…nd updated CodeQL workflow; refresh README Introduce a new GitHub Actions workflow that runs CMake builds and tests across Linux, Windows, and macOS with an expanded compiler matrix and vcpkg integration, plus a dedicated sanitizers job (AddressSanitizer). Replace the previous, smaller workflows with the updated multi-platform configuration. Add a modernized CodeQL workflow that initializes, builds with vcpkg, and runs analysis. Also update README: bump copyright year, tidy sponsors/build notes, and clarify C++14 requirement and wording.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Tried adding a CPUInfo{.h/.cpp} similar to Memory{.h/.cpp}