You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MSVC hardened build fails: /sdl makes C4996 (fopen, gmtime, strncpy...) an error #380
/sdl turns the CRT's deprecation warning C4996 into an error. Its suggested replacements are the _s functions (C11 Annex K), which no other standard library here ships. The tests check standard C and C++ functions, so they must keep calling them.
Fix: when the hardened build uses /sdl, also define _CRT_SECURE_NO_WARNINGS, Microsoft's switch for this warning. /sdl's runtime checks and its other warnings-as-errors stay. docs/security/hardening.md says so where it describes /sdl.
tests/CMakeLists.txt defines _CRT_SECURE_NO_WARNINGS when the hardened build uses /sdl. hardening.md explains it, and notes that glibc has no Annex K (checked: glibc 2.41).
Why
/sdl turned C4996 on standard functions into 38 build errors. Only that warning is silenced; /sdl's other checks stay.
Still open
MSVC can't run locally: proof is the hardened MSVC job re-run.
Reopened: #383 is incomplete. Processing the run's full digest found one C4996 that _CRT_SECURE_NO_WARNINGS doesn't cover: tests/language/declarations-initialization/attributes_test.cpp(87) calls its own [[deprecated("use new_api()")]] old_api() on purpose, and only #pragma GCC diagnostic silences it, which MSVC ignores (C4068). Under /sdl that warning is an error too. A follow-up PR adds the MSVC equivalent (#pragma warning(disable: 4996) around the call).
Activity
homer6 commentedon Nov 3, 2026
Delivered in #383.
What changed
tests/CMakeLists.txtdefines_CRT_SECURE_NO_WARNINGSwhen the hardened build uses/sdl.hardening.mdexplains it, and notes that glibc has no Annex K (checked: glibc 2.41).Why
/sdlturned C4996 on standard functions into 38 build errors. Only that warning is silenced;/sdl's other checks stay.Still open
homer6 commentedon Nov 3, 2026
Merged in #383 (7b4c54b).
What changed
Why
Still open
homer6 commentedon Nov 3, 2026
Reopened: #383 is incomplete. Processing the run's full digest found one C4996 that
_CRT_SECURE_NO_WARNINGSdoesn't cover:tests/language/declarations-initialization/attributes_test.cpp(87)calls its own[[deprecated("use new_api()")]] old_api()on purpose, and only#pragma GCC diagnosticsilences it, which MSVC ignores (C4068). Under/sdlthat warning is an error too. A follow-up PR adds the MSVC equivalent (#pragma warning(disable: 4996)around the call).homer6 commentedon Nov 3, 2026
Delivered in #386, together with #383.
What changed
attributes_test.cpp: MSVC gets#pragma warning(disable : 4996)around the deliberate[[deprecated]]call.Why
_CRT_SECURE_NO_WARNINGSdoesn't cover. Attributes tests pass on gcc-15 and clang-22.Still open
homer6 commentedon Nov 3, 2026
Merged in #386 (86f6c76), after #383.
What changed
Why
Still open