bookkeeper: fix uninitialized variable.#7542
Merged
rustyrussell merged 2 commits intoAug 10, 2024
Merged
Conversation
Valgrind found this. I think two PRs were added in parallel, which is why we only found it after merge: ``` 2024-08-09T01:57:23.7375752Z ==34263== Uninitialised byte(s) found during client check request 2024-08-09T01:57:23.7376275Z ==34263== at 0x172405: memcheck_ (mem.h:247) 2024-08-09T01:57:23.7376661Z ==34263== by 0x172585: db_bind_int (bindings.c:49) 2024-08-09T01:57:23.7377086Z ==34263== by 0x126233: log_chain_event (recorder.c:2057) 2024-08-09T01:57:23.7377544Z ==34263== by 0x11BF8B: json_utxo_deposit (bookkeeper.c:1735) 2024-08-09T01:57:23.7378207Z ==34263== by 0x12BED3: ld_command_handle (libplugin.c:1847) 2024-08-09T01:57:23.7378674Z ==34263== by 0x12C649: ld_read_json_one (libplugin.c:1998) 2024-08-09T01:57:23.7379114Z ==34263== by 0x12C780: ld_read_json (libplugin.c:2018) 2024-08-09T01:57:23.7379534Z ==34263== by 0x2990CB: next_plan (io.c:60) 2024-08-09T01:57:23.7379881Z ==34263== by 0x299D21: do_plan (io.c:422) 2024-08-09T01:57:23.7380230Z ==34263== by 0x299D88: io_ready (io.c:439) 2024-08-09T01:57:23.7380585Z ==34263== by 0x29C1BC: io_loop (poll.c:455) 2024-08-09T01:57:23.7380980Z ==34263== by 0x12D439: plugin_main (libplugin.c:2230) ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Collaborator
|
ACK eee143d |
Did a sweep to find any others, give this from sanitizer: ``` 2024-08-09T18:06:45.1729472Z plugins/bkpr/recorder.c:2057:23: runtime error: load of value 190, which is not a valid value for type 'bool' 2024-08-09T18:06:45.1729877Z SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior plugins/bkpr/recorder.c:2057:23 in ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
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.
Valgrind found this. I think two PRs were added in parallel, which is why we only found it after merge: