mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-04-23 22:50:06 +00:00
[PR #1707] [MERGED] fix: XDS segmentation faults #2424
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/CCExtractor/ccextractor/pull/1707
Author: @hrideshmg
Created: 6/28/2025
Status: ✅ Merged
Merged: 6/30/2025
Merged by: @cfsmp3
Base:
master← Head:xds_segfault_fix📝 Commits (2)
716055cfix: XDS segmentation faultsa997e15fix: memory leaks in unit tests for service decoder📊 Changes
2 files changed (+60 additions, -39 deletions)
View changed files
📝
docs/CHANGES.TXT(+1 -0)📝
src/rust/src/decoder/service_decoder.rs(+59 -39)📄 Description
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
The regression tests under the XDS category have been failing on Windows due to segmentation faults for a while now. The cause for these errors stem from a small mistake that was made when the CEA-708 decoder functions were ported to Rust.
In specific, here is the offending line:
To contrast, here is the equivalent C section:
window.rowshas the following definition:As we can see, it is an array of pointers where each pointer points to a heap allocated row of
dtvcc_symbols. In rust, this structure is incorrectly assumed to be an array ofdtvcc_symbols. I've fixed this by using pointer arithmetic in rust to do the proper operation:The unit tests which directly utilize this operation were also leaking memory due to this, and thus I've made helper functions to properly handle those as well.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.