You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(agent): Fix nr_header_create_distributed_trace_map mem leak when hashmap is destroyed (#1017)
This function created a new hashmap, but didn's pass the string dtor in
so any strdupped values were not being freed when the hashmap was
destroyed.
valgrind output from a multiverse run showed:
==220== by 0x6AA4680: nr_strdup (util_memory.c:156)
==220== by 0x6A83BD3: nr_header_create_distributed_trace_map
(nr_header.c:60)
==220== by 0x6A45D28: nr_php_amqplib_retrieve_dt_headers
(lib_php_amqplib.c:503)
==220== by 0x6A45D28: nr_rabbitmq_basic_get (lib_php_amqplib.c:742)
==220== by 0x6A74993: nr_zend_call_orig_execute_special
(php_user_instrument.c:105)
==220== by 0x6A52EAA: nr_php_instrument_func_end (php_execute.c:2086)
==220== by 0x6A54D5B: nr_php_observer_fcall_end (php_execute.c:2188)
==220== by 0x71D7ED: zend_observer_fcall_end (in /usr/local/bin/php)
==220== by 0x6E79FF: execute_ex (in /usr/local/bin/php)
==220== by 0x6F0B42: zend_execute (in /usr/local/bin/php)
==220== by 0x67C06F: zend_execute_scripts (in /usr/local/bin/php)
==220== by 0x60FA3D: php_execute_script (in /usr/local/bin/php)
after applying the fix, valgrind had no issues.
0 commit comments