Skip to content

Enable MSVC workflow for Windows builds#45

Merged
andy5995 merged 7 commits intotrunkfrom
update-msvc-workflow
Mar 28, 2026
Merged

Enable MSVC workflow for Windows builds#45
andy5995 merged 7 commits intotrunkfrom
update-msvc-workflow

Conversation

@andy5995
Copy link
Copy Markdown
Owner

  • Uncomment and update VisualStudio job in windows.yml
  • Use conditional matrix logic for Python architecture (x86 vs x64)
  • Add continue-on-error for Perl patch cleanup (may not exist)
  • Improve test error handling with proper Windows path syntax
  • Use --verbose flag for better test output

andy5995 and others added 7 commits March 28, 2026 05:26
- Uncomment and update VisualStudio job in windows.yml
- Use conditional matrix logic for Python architecture (x86 vs x64)
- Add continue-on-error for Perl patch cleanup (may not exist)
- Improve test error handling with proper Windows path syntax
- Use --verbose flag for better test output

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add preprocessor conditional to use _stricmp on MSVC while keeping
strings.h include on POSIX systems. Resolves C1083 compilation error
on Windows with Visual Studio.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
MSVC does not support Variable Length Arrays (VLAs). Replace stack-allocated
VLAs on lines 364 and 377 with heap-allocated buffers using malloc_wrap().

- file_contents: Changed from VLA to heap allocation
- tmp_line: Changed from VLA to heap allocation
- Add proper error handling and cleanup for malloc failures
- Free allocated buffers at all exit points

Fixes C2057, C2466, C2133 errors on Windows with MSVC.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add _CRT_SECURE_NO_WARNINGS define to suppress MSVC warnings about
standard C library functions like strerror(). These functions are
portable and safe; MSVC's warnings promote Microsoft-specific alternatives.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The test error reporting uses Windows batch syntax (if exist, type).
Use cmd shell explicitly instead of PowerShell default.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Set PYTHONUTF8=1 to force Python/Meson UTF-8 mode and use --no-stdsplit
to prevent stdout/stderr splitting, which can cause encoding issues with
Unicode tests on Windows CI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add free(tmp_line) at all exit paths in canfigger_parse_file loop:
- Before continue statements (empty lines, comments, sections)
- Before break statements (error conditions)
- At normal loop end

Previously, tmp_line was only freed at the end of the loop, causing
leaks when early exits occurred. AddressSanitizer now reports 0 leaks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@andy5995 andy5995 marked this pull request as ready for review March 28, 2026 11:05
@andy5995 andy5995 merged commit 3333d03 into trunk Mar 28, 2026
13 of 15 checks passed
@andy5995 andy5995 deleted the update-msvc-workflow branch March 28, 2026 11:05
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