-
-
Notifications
You must be signed in to change notification settings - Fork 750
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
macos: workaround UB and undefined instruction issue
The compiler emitted `ud2` right around this code, effectively breaking wezterm on startup. In talking this through with @dtolnay, the definition of the structs in the core_foundation crate makes it undefined behavior to pass a null pointer to its fields, despite that being a valid and documented way to use the struct. This commit works around this by defining our own local versions of the types and functions with the safe signature. I'll follow up with the owners of the core_foundation crate to submit an equivalent patch upstream.
- Loading branch information
Showing
1 changed file
with
43 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters