s-u / OpenCL

Interface allowing R to use OpenCL
Other
15 stars 10 forks source link

PROTECT fix (argument of R_MakeExternalPtr). #11

Closed kalibera closed 1 year ago

aaronpuchert commented 1 year ago

Looks plausible to me. I guess we thought that immediately calling R_MakeExternalPtr would protect this, but the extension manual says that parameters should be protected on the caller side.

But I wonder how you found this: via manual inspection, by observing a use-after-free, or do you have a static check for this?

s-u commented 1 year ago

@aaronpuchert Thanks. FWIW Tomas uses https://github.com/kalibera/rchk