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 crate is great and id really like to use it, but there's one issue and thats the expects!. Imho a library shouldn't act on global of program state (like terminating it) based on an unexpected condition - it should only do that if the state could lead to undefined behavior - which can occur in things like libc. Here we are expecting procfs to follow a certain standard in terms of layout - which should be pretty reliable - but worst case should cause an API to return an error not a panic. Don't mind helping with this effort - but wanted to get your thoughts.
The text was updated successfully, but these errors were encountered:
Can you give an example where procfs will panic? Procfs tries pretty hard to never do that, and will always return an error instead (though I have occasionally found a few panics while fuzzing some of parsers, and there are probably a few such panics still hiding somewhere).
This crate is great and id really like to use it, but there's one issue and thats the
expects!
. Imho a library shouldn't act on global of program state (like terminating it) based on an unexpected condition - it should only do that if the state could lead to undefined behavior - which can occur in things likelibc
. Here we are expectingprocfs
to follow a certain standard in terms of layout - which should be pretty reliable - but worst case should cause an API to return an error not a panic. Don't mind helping with this effort - but wanted to get your thoughts.The text was updated successfully, but these errors were encountered: