You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The reason will be displayed to describe this comment to others. Learn more.
gcc's -fanalyzer flagged this. It was concerned about the case when ffi_prep_cif returns NULL. I'm not sure if the way that ffi_prep_cif is called can result in a NULL return value.
We could throw an error. I don't think it is a specifically a memerror.
The reason will be displayed to describe this comment to others. Learn more.
Indeed, ffi_prep_cif specifies some error conditions, don't seem too relevant to our use case, though. We could just as well assert, that gcb != NULL if that's the only reason why it would be NULL (but realistically speaking, memory can always be an issue, no?)
The reason will be displayed to describe this comment to others. Learn more.
Even though most of these ffi errors should be rare or impossible, I think I'll rework the error reporting for this file and have it throw errors for all the ffi-reported failure conditions.
858e062
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.
Could we throw an SCM memerror here?
858e062
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.
gcc's
-fanalyzer
flagged this. It was concerned about the case whenffi_prep_cif
returnsNULL
. I'm not sure if the way thatffi_prep_cif
is called can result in aNULL
return value.We could throw an error. I don't think it is a specifically a memerror.
858e062
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.
Indeed,
ffi_prep_cif
specifies some error conditions, don't seem too relevant to our use case, though. We could just as well assert, thatgcb != NULL
if that's the only reason why it would be NULL (but realistically speaking, memory can always be an issue, no?)858e062
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.
Even though most of these ffi errors should be rare or impossible, I think I'll rework the error reporting for this file and have it throw errors for all the ffi-reported failure conditions.