Skip to content

what should the security policy of this crate be? #994

Answered by BurntSushi
BurntSushi asked this question in Q&A
Discussion options

You must be logged in to vote

I am going to add this to the top-level crate documentation as part of the regex 1.9 release:

## Panics

Outside of clearly documented cases, most APIs in this crate are intended to
never panic regardless of the inputs given to them. For example, `Regex::new`,
`Regex::is_match`, `Regex::find` and `Regex::captures` should never panic. That
is, it is an API promise that those APIs will never panic no matter what inputs
are given to them. With that said, regex engines are complicated beasts, and
providing a rock solid guarantee that these APIs literally never panic is
essentially equivalent to saying, "there are no bugs in this library." That is
a bold claim, and not really one that can be f…

Replies: 6 comments 21 replies

Comment options

You must be logged in to vote
1 reply
@BurntSushi
Comment options

Comment options

You must be logged in to vote
3 replies
@BurntSushi
Comment options

@workingjubilee
Comment options

@BurntSushi
Comment options

Comment options

You must be logged in to vote
14 replies
@BurntSushi
Comment options

@felix91gr
Comment options

@BurntSushi
Comment options

@felix91gr
Comment options

@BurntSushi
Comment options

Comment options

You must be logged in to vote
1 reply
@BurntSushi
Comment options

Comment options

You must be logged in to vote
2 replies
@BurntSushi
Comment options

@BurntSushi
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by BurntSushi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants