Commit f92e792
committed
Add support for RUBY_FREE_AT_EXIT
OpenSSL::Provider does not automatically unload at shutdown, causing it
to be reported as a memory leak by memory leak checkers when using
RUBY_FREE_AT_EXIT. For example, LSAN reports many memory leaks that looks
like this:
#15 0x78dd17e2dfb4 (/lib/x86_64-linux-gnu/libcrypto.so.3+0x22dfb4)
#16 0x78dd17e2b195 in OSSL_PROVIDER_try_load (/lib/x86_64-linux-gnu/libcrypto.so.3+0x22b195)
#17 0x78dd35ba8751 in ossl_provider_s_load ext/openssl/ossl_provider.c:60:16
This commit adds a hook at shutdown to unload all the OpenSSL providers.1 parent 7f2e009 commit f92e792
2 files changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
185 | 199 | | |
186 | 200 | | |
187 | 201 | | |
| |||
200 | 214 | | |
201 | 215 | | |
202 | 216 | | |
| 217 | + | |
| 218 | + | |
203 | 219 | | |
204 | 220 | | |
205 | 221 | | |
| |||
0 commit comments