Add missing init/deinit calls#42
Conversation
For the Python extension, de-initialization of Assuan as missing. For both the Python extension and the agent executable, initialization and de-initialization of the createrepo_c parser and dumper were missing, leading to a possible segfault when the dumper was lazy initialized by multiple threads simultaneously.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #42 +/- ##
==========================================
+ Coverage 48.97% 55.54% +6.57%
==========================================
Files 20 22 +2
Lines 2638 2830 +192
Branches 538 601 +63
==========================================
+ Hits 1292 1572 +280
+ Misses 1039 936 -103
- Partials 307 322 +15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
j-rivero
left a comment
There was a problem hiding this comment.
One question test/integration_main.cpp there is an assuan_sock_init(); call, do we need to there the cr_xml_dump_init(); and cr_package_parser_init(); ?
Same for deinit and cleanups in that same file.
Yes! Good call. Done in c0f4dfa. |
c0f4dfa to
838cba8
Compare
j-rivero
left a comment
There was a problem hiding this comment.
Another round and I think we are good to go
j-rivero
left a comment
There was a problem hiding this comment.
Good to go. All the big problems are patched as far as I can tell. I left one minor patch.
|
Thanks!
I'm not seeing this, and I don't wanna miss it. Is there a chance that GitHub dropped a comment somewhere? |
j-rivero
left a comment
There was a problem hiding this comment.
ouch, missed to press the button sorry
Co-authored-by: Jose Luis Rivero <jrivero@honurobotics.com>
For the Python extension, de-initialization of Assuan as missing. For both the Python extension and the agent executable, initialization and de-initialization of the createrepo_c parser and dumper were missing, leading to a possible segfault when the dumper was lazy initialized by multiple threads simultaneously.
The changes to
agent.cinvolve a small refactor to move the bulk of the code out ofmainand into a newrunfunction. Themainfunction is still responsible for argument parsing and invocation of the global init/deinit routines, and the actual operations are called fromrunnow. This reduced a lot of the deinit code duplication, especially given that we're now adding two more of them.Closes #41