Message ID | 20240215145227.782554-2-luiz.dentz@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | fb339bde646ca9717f0787aefd6f6cbe4fb13f78 |
Headers | show |
Series | [BlueZ,v1,1/2] btdev: Fix crash on page_timeout | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | warning | WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #105: #0 0x7f199c3a01c9 in g_io_channel_unref (/lib64/libglib-2.0.so.0+0x4d1c9) /github/workspace/src/src/13558579.patch total: 0 errors, 1 warnings, 17 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. /github/workspace/src/src/13558579.patch has style problems, please review. NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. |
tedd_an/GitLint | success | Gitlint PASS |
tedd_an/IncrementalBuild | success | Incremental Build PASS |
diff --git a/tools/rfcomm-tester.c b/tools/rfcomm-tester.c index a9adf7f0f52d..b78b50537e4a 100644 --- a/tools/rfcomm-tester.c +++ b/tools/rfcomm-tester.c @@ -30,6 +30,7 @@ #include "src/shared/tester.h" #include "src/shared/mgmt.h" +#include "src/shared/util.h" struct test_data { struct mgmt *mgmt; @@ -815,9 +816,7 @@ static void test_server(const void *test_data) #define test_rfcomm(name, data, setup, func) \ do { \ struct test_data *user; \ - user = malloc(sizeof(struct test_data)); \ - if (!user) \ - break; \ + user = new0(struct test_data, 1); \ user->hciemu_type = HCIEMU_TYPE_BREDRLE52; \ user->test_data = data; \ user->io_id = 0; \
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> This fixes to following trace caused by not initializing data->io: AddressSanitizer:DEADLYSIGNAL ================================================================= ERROR: AddressSanitizer: SEGV on unknown address (pc 0x7f199c3a01c9 bp 0x7ffc26624a10 sp 0x7ffc26624a00 T0) The signal is caused by a READ memory access. Hint: this fault was caused by a dereference of a high value address (see register values below). Disassemble the provided pc to learn . #0 0x7f199c3a01c9 in g_io_channel_unref (/lib64/libglib-2.0.so.0+0x4d1c9) #1 0x5565f82fcece in test_post_teardown tools/rfcomm-tester.c:205 #2 0x5565f83939b3 in teardown_callback src/shared/tester.c:434 --- tools/rfcomm-tester.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)