forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pyln: remove unused variable #2
Closed
Closed
Conversation
This file contains 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
Variable inroduced in 708fb17 is making CI fail.
rustyrussell
pushed a commit
that referenced
this pull request
Jun 5, 2023
The function is tiny and was only used in one location. And that one location was leaking memory. Detected by ASan: ==2637667==ERROR: LeakSanitizer: detected memory leaks Direct leak of 7 byte(s) in 1 object(s) allocated from: #0 0x4cd758 in __interceptor_strdup #1 0x64c70c in json_stream_log_suppress_for_cmd lightning/lightningd/jsonrpc.c:597:31 #2 0x68a630 in json_getlog lightning/lightningd/log.c:974:2 ... SUMMARY: AddressSanitizer: 7 byte(s) leaked in 1 allocation(s).
rustyrussell
pushed a commit
that referenced
this pull request
Jun 5, 2023
It is possible for db_column_bytes() to return 0 and for db_column_blob() to return NULL even when db_column_is_null() returns false. We need to short circuit in this case. Detected by UBSan: db/bindings.c:479:12: runtime error: null pointer passed as argument 2, which is declared to never be null /usr/include/string.h:44:28: note: nonnull attribute specified here #0 0x95f117 in db_col_arr_ db/bindings.c:479:2 #1 0x95ef85 in db_col_channel_type db/bindings.c:459:32 #2 0x852c03 in wallet_stmt2channel wallet/wallet.c:1483:9 #3 0x81f396 in wallet_channels_load_active wallet/wallet.c:1749:23 #4 0x81f03d in wallet_init_channels wallet/wallet.c:1765:9 ElementsProject#5 0x72f1f9 in load_channels_from_wallet lightningd/peer_control.c:2257:7 ElementsProject#6 0x672856 in main lightningd/lightningd.c:1121:25
rustyrussell
pushed a commit
that referenced
this pull request
Jun 5, 2023
Fixes nullability errors detected by UBSan: wire/fromwire.c:173:46: runtime error: null pointer passed as argument 1, which is declared to never be null external/libwally-core/src/secp256k1/include/secp256k1.h:432:3: note: nonnull attribute specified here #0 0x65214a in fromwire_secp256k1_ecdsa_signature wire/fromwire.c:173:6 #1 0x659500 in printwire_secp256k1_ecdsa_signature devtools/print_wire.c:331:1 #2 0x646ba2 in printwire_channel_update wire/peer_printgen.c:1900:7 #3 0x637182 in printpeer_wire_message wire/peer_printgen.c:128:11 #4 0x65a097 in main devtools/decodemsg.c:85:10
morehouse
added a commit
that referenced
this pull request
Jun 5, 2023
The function is tiny and was only used in one location. And that one location was leaking memory. Detected by ASan: ==2637667==ERROR: LeakSanitizer: detected memory leaks Direct leak of 7 byte(s) in 1 object(s) allocated from: #0 0x4cd758 in __interceptor_strdup #1 0x64c70c in json_stream_log_suppress_for_cmd lightning/lightningd/jsonrpc.c:597:31 #2 0x68a630 in json_getlog lightning/lightningd/log.c:974:2 ... SUMMARY: AddressSanitizer: 7 byte(s) leaked in 1 allocation(s).
morehouse
added a commit
that referenced
this pull request
Jun 5, 2023
It is possible for db_column_bytes() to return 0 and for db_column_blob() to return NULL even when db_column_is_null() returns false. We need to short circuit in this case. Detected by UBSan: db/bindings.c:479:12: runtime error: null pointer passed as argument 2, which is declared to never be null /usr/include/string.h:44:28: note: nonnull attribute specified here #0 0x95f117 in db_col_arr_ db/bindings.c:479:2 #1 0x95ef85 in db_col_channel_type db/bindings.c:459:32 #2 0x852c03 in wallet_stmt2channel wallet/wallet.c:1483:9 #3 0x81f396 in wallet_channels_load_active wallet/wallet.c:1749:23 #4 0x81f03d in wallet_init_channels wallet/wallet.c:1765:9 ElementsProject#5 0x72f1f9 in load_channels_from_wallet lightningd/peer_control.c:2257:7 ElementsProject#6 0x672856 in main lightningd/lightningd.c:1121:25
morehouse
added a commit
that referenced
this pull request
Jun 5, 2023
Fixes nullability errors detected by UBSan: wire/fromwire.c:173:46: runtime error: null pointer passed as argument 1, which is declared to never be null external/libwally-core/src/secp256k1/include/secp256k1.h:432:3: note: nonnull attribute specified here #0 0x65214a in fromwire_secp256k1_ecdsa_signature wire/fromwire.c:173:6 #1 0x659500 in printwire_secp256k1_ecdsa_signature devtools/print_wire.c:331:1 #2 0x646ba2 in printwire_channel_update wire/peer_printgen.c:1900:7 #3 0x637182 in printpeer_wire_message wire/peer_printgen.c:128:11 #4 0x65a097 in main devtools/decodemsg.c:85:10
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.
Variable inroduced in 708fb17 is making CI fail.