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

Completion of error handling #1115

Open
elfring opened this issue Apr 15, 2015 · 5 comments
Open

Completion of error handling #1115

elfring opened this issue Apr 15, 2015 · 5 comments

Comments

@elfring
Copy link

elfring commented Apr 15, 2015

Would you like to add more error handling for return values from functions like the following?

@arunsrinivasan
Copy link
Member

@elfring would be great for malloc to begin with.

@elfring
Copy link
Author

elfring commented Apr 30, 2015

I suggest to avoid ignorance of return values a bit more.

Are you interested to apply aspect-oriented software development?
How do you think about to encapsulate error detection and corresponding exception handling as a reusable aspect in your software?

@mattdowle
Copy link
Member

Thanks for the suggestion @elfring. Aspect compiler sounds good but I'm not sure this warrants the time to integrate a different compiler into our CI. I did a grep -A 2 malloc *.c. We have 55 calls and admittedly it was difficult to check them all. I'm thinking we should follow a standard that the immediate line after the malloc should handle a fail. We have quite a few comments on the line afterwards, and sometimes several malloc checked together in one branch, so I can think about a simple way to handle this and then add a grep style check in CRAN_Release.cmd. But there will be other things Aspect might spot for us.
We also have Codacy running in CI. It has caught some problems but I'm not sure it catches this. I tried to search to find out if Codacy covers this, but I couldn't confirm it within 5 mins.
There's no harm at all for us to try Aspect, with a good chance of it finding problems for us. But I don't know how to integrate it into our CI and I fear it could take more time than it warrants.

@elfring
Copy link
Author

elfring commented May 20, 2019

Would you eventually prefer to work with the semantic patch language together (besides trying a tool like “AspectC++” out)?

@mattdowle
Copy link
Member

@elfring It looks very interesting. Yes: maybe. The only barrier is the effort needed to try it and get to a stage where it shows some benefit. It has not been the case that Codacy has found much, for example.

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

No branches or pull requests

4 participants