Repository navigation
fix(skia-x11): Fix X11 clipboard segfault on TIMESTAMP selection requests - #24168
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes an X11 clipboard crash on TIMESTAMP selection requests in the Skia X11 runtime by ensuring the timestamp value is passed to XChangeProperty as a pointer to data (via an IntPtr[]) rather than being misinterpreted as a memory address.
Changes:
- Update the TIMESTAMP reply path to call
XLib.XChangePropertywithIntPtr[]data containing_ownershipTimestamp(avoids passing the timestamp as a raw pointer value).
Process note (blocks readiness):
- The PR description lists “GitHub Issue: n/a”. Per repo PR rules, please add a proper issue link (Fixes/Closes/Related to with full URL), or add the explicit “No related issue…” note with an approving team member as described in the guidelines.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
morning4coffe-dev
left a comment
There was a problem hiding this comment.
The fix selects the correct XChangeProperty buffer overload: the format-32 TIMESTAMP value must be supplied through an IntPtr[] buffer with one element, not interpreted as an IntPtr address. The existing raw-pointer overload explains the invalid-memory access, and the property type/element count are retained. This is Xlib protocol/marshaling correctness; there is no corresponding microsoft-ui-xaml implementation to translate.
92a2b5e to
13afaa2
Compare
|
This pull request is merged. |
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 245204 found UI Test snapshots differences: Details
|
GitHub Issue: n/a
PR Type:
🐞 Bugfix
What changed? 🚀
Fixed X11 clipboard TIMESTAMP selection replies: ownership timestamp is now passed via IntPtr[] instead of a bare IntPtr, so XChangeProperty receives a pointer to the value rather than treating the timestamp as a memory address. Fixes intermittent segfaults when paste is triggered repeatedly while the app owns the clipboard.
PR Checklist ✅
Screenshots Compare Test Runresults.