- SmokeTest.vxGetParameterByIndex - Double-free crash
- SmokeTest.vxSetParameterByReference - Parameter lifecycle issue
- SmokeTestBase.vxReleaseReferenceBase - Reference counting
Parameter storage has dual ownership:
- Node stores:
parameters: Mutex<Vec<Option<u64>>>in c_api.rs - Global registry:
PARAMETERS: Mutex<HashMap<u64, Arc<VxCParameter>>>in unified_c_api.rs
When vxReleaseParameter is called:
- Removes from PARAMETERS HashMap → Arc drop
- Also tries to free from other location
- DOUBLE FREE
Current (BROKEN):
// Two places store the same data
node.parameters: Vec<Option<u64>> // c_api.rs
PARAMETERS: HashMap<u64, Arc<VxCParameter>> // unified_c_api.rsFixed (SIMPLE):
// Only one place stores data
node.parameters: Vec<Option<u64>> // Just store reference IDs, no Arc
// Remove PARAMETERS HashMap entirely- Comment out
static PARAMETERSin unified_c_api.rs - Remove from vxGetParameterByIndex
- Remove from vxReleaseParameter
- Keep only node.parameters vector
- Just return (node_id << 32) | index as handle
- No Arc storage needed
- No global registry lookup
- Only decrement REFERENCE_COUNTS
- Don't try to remove from PARAMETERS
- Simple reference counting only
- Run SmokeTest* tests
- Should pass all 3 remaining failures
35/35 Core tests passing (100%)
- openvx-core/src/unified_c_api.rs
- openvx-core/src/c_api.rs (minor changes)
- Iteration 1: 30 minutes
- If fails, debug and Iteration 2