swig-fortran / swig

This fork of SWIG creates Fortran wrapper code from C++ headers.
http://www.swig.org
Other
42 stars 11 forks source link

Fix inconsistencies with null shared pointers #126

Closed sethrj closed 4 years ago

sethrj commented 5 years ago

A function could previously return a shared pointer by value that was unassigned, leading to possible null pointer dereferences when called later. @aprokop This should fix that crash you had in ForTrilinos. Validity can be checked with c_associated(wrapper%swigdata%cptr).

sethrj commented 5 years ago

@aprokop Before we merge this, can you confirm that it it's the functionality you need?

sethrj commented 5 years ago

Ping @aprokop , sorry I missed last thursday's stand-up 😬