Skip to content

When is the ability to trigger a panic a bug? #1526

Answered by Byron
EliahKagan asked this question in Q&A
Discussion options

You must be logged in to vote

(Mostly pasting my previous private response)

Panics are considered bugs, even though some parts where it's inconvenient to handle errors properly also panic. That behaviour is really only 'allowed' on Windows in relation to illformed Unicode.

It would also be a problem if illformed unicode could be used to bring down server processes, so codepaths that are run there certainly should be handling these as errors instead.

All in all, the error handling related to illformed Unicode is a compromise which probably can be exploited and used as DoS in some shape or form.

There are probably some places where code uses a panicking version of gix_path::*() functions even though it could also use an…

Replies: 1 comment

Comment options

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