Skip to content

P4c: build hygiene and deferred cleanup - #1

Merged
Rovey merged 8 commits into
mainfrom
p4c-hygiene
Sep 26, 2026
Merged

Rovey merged 8 commits into
mainfrom
p4c-hygiene

Conversation

@Rovey

@Rovey Rovey commented Sep 26, 2026

Copy link
Copy Markdown
Owner

Work in progress (overnight session). Opened as a draft so CI runs on the branch, including the new ASan job.

🤖 Generated with Claude Code

Rovey and others added 8 commits September 27, 2026 01:16
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- CMakePresets.json with default/asan configure presets, debug/release/asan
  build and test presets, and a ci workflow preset.
- /W4 /permissive- plus the cpp-best-practices warning set as errors on our
  targets; third_party is a SYSTEM include (/external:W0). The code was
  already clean.
- gao.exe: /guard:cf /sdl, linked /GUARD:CF /CETCOMPAT (verified with
  dumpbin).
- Embedded manifest: asInvoker, Windows 10/11, longPathAware, UTF-8 code
  page, PerMonitorV2; the console output code page is set to UTF-8.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…op when a journal close fails

- Journal lines with an id outside 1..999999999 or a clock value outside
  0..100000 are ignored, and integers are range-checked before narrowing
  (4294967305 no longer truncates to 9).
- A boot_strikes value that is present but not a whole number in 0..1000
  reads as the maximum: boot-apply fails closed instead of re-enabling.
- A journal entry that cannot be closed stops the run at stock.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- --stress drops the errors= column (a wrong value ends the run before a
  line prints) and prints n/a instead of -1 in the verdict.
- --optimize refuses to tune when its journal exists but cannot be read, or
  cannot be written (a session line is written first).
- --optimize never saves a profile without a driver version and GPU id, and
  a new profile starts with zero strikes.
- An unknown driver at logon gets its own message instead of 'driver changed'.
- --reset reports when the power limit could not be restored.
- The power-range callback no longer dereferences a failed query.
- A failed atomic write removes its temp file.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… ASan

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
/guard:cf only guards code compiled with it, so the NVAPI function-pointer
calls in hw/ were unchecked. A gao_hardening interface now applies
/guard:cf /sdl to core, hw and gao (clean build). Also from the review:
presets require CMake 4.2 (the VS 2026 generator), test presets fail when no
test is found, read_lines reports a read error mid-file, and the strike test
asserts the exact fail-closed value.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Rovey
Rovey merged commit 3acc22f into main Sep 26, 2026
2 checks passed
@Rovey
Rovey deleted the p4c-hygiene branch September 26, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant