-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
you can't call CGDataProviderCreateWithData on a stack pointer #17263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
you can't call CGDataProviderCreateWithData on a stack pointer #17263
Conversation
…s not allowed Without this fix, matplotlib will crash on an upcoming release of Mac OS, becuase the CGDataProvider it creates will be accessed on a different thread after it's stack allocation's lifetime has ended.
Thanks! @lawrence-danna-apple would you be willing to comment on #17084 ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someone on macOS should test this, but the (Obj)C code makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, code changes look correct, but someone with an OSX machine should test this out and then merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and seems to work fine for me here.
…Data on a stack pointer
…263-on-v3.2.x Backport PR #17263 on branch v3.2.x (you can't call CGDataProviderCreateWithData on a stack pointer)
It's illegal to call CGDataProviderCreateWithData on a stack pointer.
Without this fix, matplotlib will crash on an upcoming release of Mac OS, becuase
the CGDataProvider it creates will be accessed on a different thread after
its stack allocation's lifetime has ended.