Commit 18b26df
Avoid using un-thread-safe static buffers when printing errors. (#102)
Motivation:
BoringSSL's docs make it pretty clear that ERR_error_string is not safe to use in a
concurrent context. Sadly, NIO is pretty damn concurrent, so we should probably stop using it.
Modifications:
- Rewrite the error printing logic to use ERR_error_string_n which takes a buffer to write
into.
Result:
Error strings will not be corrupted in multithreaded contexts.1 parent 4f9d64d commit 18b26df
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | | - | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
0 commit comments