Skip to content
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

potential problem with default malloc mode for generated c structs #24

Open
Aeva opened this issue Apr 17, 2021 · 2 comments
Open

potential problem with default malloc mode for generated c structs #24

Aeva opened this issue Apr 17, 2021 · 2 comments

Comments

@Aeva
Copy link

Aeva commented Apr 17, 2021

The c structs are generated without specifying #:malloc-mode 'atomic-interior, so the 'atomic will be used by default. This is problematic as structs allocated via the corresponding Make- functions may be moved in memory during GC cycles. This can cause random hard to debug driver-specific crashes as there is no guarantee that a driver is done with an application supplied pointer after a given API call returns.

@zyrolasting
Copy link
Owner

Thank you for this, and apologies for the massively delayed response. I simply missed this in my notifications. I will address this soon.

@zyrolasting
Copy link
Owner

zyrolasting commented Dec 3, 2021

I also want to double down on the gratitude because I experienced segfaults in debug layer callbacks without knowing why. You may very well have solved that just now then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants