git/trace2
Adam Murray 2fd367cf63 trace2: prevent segfault on config collection with valueless true
When TRACE2 analytics is enabled, a configuration variable set to
"valueless true" causes a segfault.

Steps to Reproduce

    GIT_TRACE2=true GIT_TRACE2_CONFIG_PARAMS=status.*
    git -c status.relativePaths version
    Expected Result
    git version 2.46.0
    Actual Result
    zsh: segmentation fault GIT_TRACE2=true

Add checks to prevent the segfault and instead show that the
variable without value.

Signed-off-by: Adam Murray <ad@canva.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-01-23 10:01:56 -08:00
..
tr2_cfg.c Merge branch 'gc/config-context' 2023-07-06 11:54:48 -07:00
tr2_cfg.h
tr2_cmd_name.c treewide: remove unnecessary includes of cache.h 2023-03-21 10:56:53 -07:00
tr2_cmd_name.h
tr2_ctr.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:33 -08:00
tr2_ctr.h trace2: add global counter mechanism 2022-10-24 12:45:26 -07:00
tr2_dst.c treewide: remove unnecessary includes of cache.h 2023-03-21 10:56:53 -07:00
tr2_dst.h
tr2_sid.c treewide: remove unnecessary includes of cache.h 2023-03-21 10:56:53 -07:00
tr2_sid.h
tr2_sysenv.c trace2: handle NULL values in tr2_sysenv config callback 2023-12-09 08:24:47 +09:00
tr2_sysenv.h
tr2_tbuf.c treewide: remove unnecessary cache.h includes in source files 2023-02-23 17:25:28 -08:00
tr2_tbuf.h
tr2_tgt.h trace2: plumb config kvi 2023-06-28 14:06:39 -07:00
tr2_tgt_event.c trace2: prevent segfault on config collection with valueless true 2025-01-23 10:01:56 -08:00
tr2_tgt_normal.c trace2: prevent segfault on config collection with valueless true 2025-01-23 10:01:56 -08:00
tr2_tgt_perf.c trace2: prevent segfault on config collection with valueless true 2025-01-23 10:01:56 -08:00
tr2_tls.c trace2/tr2_tls.h: remove unnecessary include 2023-12-26 12:04:32 -08:00
tr2_tls.h trace2/tr2_tls.h: remove unnecessary include 2023-12-26 12:04:32 -08:00
tr2_tmr.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:33 -08:00
tr2_tmr.h trace2: add stopwatch timers 2022-10-24 12:45:26 -07:00