OpenCV 5: xphoto bm3dDenoising corrupts the heap (test skipped)
Open
@shimat is already working on this.
Since Jun 25, 2026.
upstream: OpenCV
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 1.2k
- Avg merge
- 11h 26m
- Merged PRs (30d)
- 15
Description
Summary
On the OpenCV 5 (5.x) branch, cv::xphoto::bm3dDenoising (exposed via CvXPhoto.Bm3dDenoising) writes out of bounds and corrupts the process heap.
Symptoms
XPhotoTest.Bm3dDenoisingpasses when run in isolation, but when run together with other tests the process crashes at teardown / next allocation with exit code0xC0000374(heap corruption) or0xC0000005(access violation).- This catastrophic crash aborts the whole test run, so it masks unrelated failures in CI.
- Confirmed: running the XPhoto namespace without
Bm3dDenoisingpasses (14/14); adding it back crashes.
Workaround
XPhotoTest.Bm3dDenoising is marked Skip on 5.x so the rest of the suite can run. NONFREE is enabled in the build, so the real (patented) implementation runs.
TODO
- Determine whether this is an upstream OpenCV 5
opencv_contrib/modules/xphotoregression and report upstream / pin a fix. - Re-enable the test once fixed.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.