Repository navigation
Fix CI Python version on ubuntu-26.04 and WavWriter zero-byte write UB - #734
Open
atommarvel wants to merge 1 commit into
Open
atommarvel wants to merge 1 commit into
atommarvel wants to merge 1 commit into
Conversation
atommarvel
commented
Nov 21, 2026
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: 3.8 | ||
| python-version: '3.x' |
Author
There was a problem hiding this comment.
I'm not the biggest fan of not specifying the exact version. I would probably go with 3.14 which is the native Python version for Ubuntu 26.04 LTS. Looks like 3.14 has support until Oct 2030. I'll let the reviewer decide what direction to take though.
atommarvel
commented
Nov 21, 2026
|
|
||
| uint8_t *base = reinterpret_cast<uint8_t *>(transfer_buff); | ||
| f_write(&fp_, base + offset_bytes, remaining_size, &bw); | ||
| if(remaining_size > 0) |
Author
There was a problem hiding this comment.
Seems like technically this change isn't required for the CI fix, but it seems like a value add.
Collaborator
|
Hey, thanks for the PR. I was going to address this today; you beat me to it! I'd like the python version to be tagged at a real version. If 3.14 works, you can pin it there. The other changes are fine. |
This branch has not been deployed
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.
NOTICE
This fix should fix the CI failures that new PRs are seeing in the checks.
Beyond this section, this PR's body and the code changes are fully written by AI. My day job is Android development so I currently don't have the knowledge to vet these changes deeply.
Summary
Fixes two CI failures triggered after
ubuntu-latestmoved toubuntu-26.04(observed on #732 and #733):Update Python setup in
Build / build-makefile(.github/workflows/build.yml):actions/setup-python@v2withpython-version: 3.8fails onubuntu-26.04(Version 3.8 with arch x64 not found).actions/setup-python@v5withpython-version: '3.x'(ci/build_examples.pyonly uses Python 3 stdlib modules).Fix out-of-bounds
std::vectorindexing UB on 0-byteWavWritertail flush (src/util/WavWriter.h,tests/FatFsMock.cpp):wptr_ == cap_point),WavWriter::SaveFile()flushed the half-buffer viaWrite()and then computedremaining_size == 0, callingf_write(&fp_, ..., 0, &bw).tests/FatFsMock.cpp,f_writeevaluatedstd::memcpy(&state.file_data[start_idx], buff, 0)withstart_idx == state.file_data.size(), triggeringSIGABRTunder standard-library bounds assertions (_GLIBCXX_ASSERTIONSenabled onubuntu-26.04) insaveFile_flush0HalfOnce,saveFile_s32StereoFlush0HalfOnce, andsaveFile_s16MonoFlush0HalfOnce.f_writecall inWavWriter::SaveFile()withif(remaining_size > 0)and guardedstd::memcpyinFatFsMock.cppwithif(btw > 0).Testing
saveFile_flush0HalfOnceabort locally using-D_LIBCPP_ENABLE_ASSERTIONS=1(assertion __n < size() failed, exit 134).util_WavWritertests intests/WavWriter_gtest.cppwith-D_LIBCPP_ENABLE_ASSERTIONS=1 -fsanitize=address,undefined— all 13 pass.f_writeat EOF inFatFsMock.cppwith assertions + ASan/UBSan enabled.