Qt 6.12 Accessibility Crash Fixes
Three C++ re-entrancy & memory-safety patches for Qt 6.12, with ASan reproducers.
$ ctest -R accessible_table_reentrancy
==81234==ERROR: AddressSanitizer: heap-use-after-free
in QAccessibleTable::modelChange() qaccessible.cpp
after patch:
[==========] 3 tests ran. PASSED 3. 0 ASan reports. The problem
While debugging LabPlot on macOS ARM64, I hit hard crashes inside Qt 6.12's accessibility layer - not my code, Qt's. Model-change notifications were re-entering QAccessibleTable and mutating collections mid-iteration; on Cocoa, a `-1` NSUInteger subscript crashed outright.
How it's built
I isolated each fault to a minimal reproducer under AddressSanitizer, then patched Qt itself: an iterator-invalidation fix in QAccessibleTable::modelChange, a re-entrancy guard around accessibility modelChange dispatch (QTBUG-149629), and a bounds guard on the Cocoa accessibility cell path. Patches are kept on reviewable qtbase branches for Gerrit submission.
Proof
Public repo with 3 documented crash fixes, ASan reproducers, and clean diffs - the kind of low-level, upstream-grade debugging most portfolios can't show.
Highlights
- QTBUG-149629 - accessibility re-entrancy during modelChange
- Iterator invalidation fix inside QAccessibleTable
- macOS Cocoa -1 subscript crash guarded, ASan-clean after patch