Try to avoid losing client outputs if exit clean-up crashes; try to avoid (Open)SSL-related crashes there#3497
Merged
Conversation
…rkupstools#3454] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…anup() right away [networkupstools#3454] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…d exit, just in case [networkupstools#3454] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
|
A ZIP file with standard source tarball and another tarball with pre-built docs for commit c9f8dc6 is temporarily available: NUT-tarballs-PR-3497.zip. |
|
❌ Build nut 2.8.5.4853-master failed (commit eacf7d2858 by @jimklimov) |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hopefully fixes: #3454
Depending on the system and compiler optimizations, possibly the root cause was not NULL-initializing the
ssl_ctxglobal variable (by standard it should have been NULL by default, but...) so we might be freeing a random non-NULL address duringexit().It still seems reasonable to clean up and claim that SSL did not get initialized if we bail out from
upscli_init()early (mid-way through the routine).The rest is a band-aid for symptoms seen here (e.g. losing
upscoutput if clean-up crashed) just in case something like this keeps misfiring in later evolution.