Xuanwo opened a new pull request, #8774: URL: https://github.com/apache/opendal/pull/8774
# Which issue does this PR close? N/A. The panic is reproduced by the regression test added in this PR. # Rationale for this change `normalize_path` preserves NUL bytes, and services such as `Memory` accept paths like `a\0b`. The dtrace layer passed every probe path through `CString::new(path).unwrap()`, so any operation on such a path panicked with `NulError` on Linux. Only the deleter probe already handled this case with `unwrap_or_default()`. # What changes are included in this PR? - Add a `probe_cstring` helper that converts probe arguments with `CString::new(value).unwrap_or_default()`. - Use it at all 16 probe sites so a path containing NUL is reported as an empty string instead of panicking, matching the existing deleter behavior. - Document the empty-string behavior for all probe arguments. - Add a unit test for the conversion and a regression test that exercises `write`, `read`, `stat`, `list`, `copy`, `rename`, `create_dir`, `presign`, and `delete` with NUL-containing paths against `services::Memory`. # Are there any user-facing changes? No API changes. DTrace probes no longer panic on paths containing NUL bytes; those paths appear as an empty string in probe arguments. # Breaking changes # AI Usage Statement - Harness: Pi coding agent (T3 Code orchestration) - Model: group/deepseek (Magpie provider) - Effort: max - Role: Implemented the fix, added regression tests, and ran formatting, clippy, and package tests. No assumptions or unknowns affect review. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
