-
Problem report
-
Resolution: Fixed
-
Trivial
-
4.0.0alpha6
-
Sprint 35
-
0.125
lld_application_make() does not initialize application->ts_delete
==909== Conditional jump or move depends on uninitialised value(s) ==909== at 0x6B9FD4: lld_remove_lost_applications (lld_item.c:3354) ==909== by 0x6C4B52: lld_update_items (lld_item.c:4535) ==909== by 0x6A7C83: lld_process_discovery_rule (lld.c:680) ==909== by 0x4D7C9D: zbx_preprocess_item_value (preprocessing.c:663) ==909== by 0x45060A: get_values (poller.c:775) ==909== by 0x459C7F: poller_thread (poller.c:924) ==909== by 0x6096EA: zbx_thread_start (threads.c:128) ==909== by 0x42B030: MAIN_ZABBIX_ENTRY (server.c:1105) ==909== by 0x5D18A8: daemon_start (daemon.c:392) ==909== by 0x428959: main (server.c:854) ==909== Uninitialised value was created by a heap allocation ==909== at 0x4C2DBAB: malloc (vg_replace_malloc.c:299) ==909== by 0x61542A: zbx_malloc2 (misc.c:491) ==909== by 0x6C0F05: lld_application_make (lld_item.c:3752) ==909== by 0x6C0F05: lld_applications_make (lld_item.c:3855) ==909== by 0x6C0F05: lld_update_items (lld_item.c:4501) ==909== by 0x6A7C83: lld_process_discovery_rule (lld.c:680) ==909== by 0x4D7C9D: zbx_preprocess_item_value (preprocessing.c:663) ==909== by 0x45060A: get_values (poller.c:775) ==909== by 0x459C7F: poller_thread (poller.c:924) ==909== by 0x6096EA: zbx_thread_start (threads.c:128) ==909== by 0x42B030: MAIN_ZABBIX_ENTRY (server.c:1105) ==909== by 0x5D18A8: daemon_start (daemon.c:392) ==909== by 0x428959: main (server.c:854)
Fix:
Index: src/libs/zbxdbhigh/lld_item.c =================================================================== --- src/libs/zbxdbhigh/lld_item.c (revision 81413) +++ src/libs/zbxdbhigh/lld_item.c (working copy) @@ -3753,7 +3753,7 @@ application->applicationid = 0; application->application_prototypeid = application_prototype->application_prototypeid; application->application_discoveryid = 0; - + application->ts_delete = 0; application->name = zbx_strdup(NULL, application_prototype->name); substitute_lld_macros(&application->name, jp_row, ZBX_MACRO_ANY, NULL, 0); zbx_lrtrim(application->name, ZBX_WHITESPACE);
Reproducible by applications discovery.