CONFIG_LOG_DETECT_MISSED_STRDUP

Detect missed handling of transient strings

Type: bool

Help

If enabled, logger will assert and log error message is it detects
that string format specifier (%s) and string address which is not from
read only memory section and not from pool used for string duplicates.
String argument must be duplicated in that case using log_strdup().
Detection is performed during log processing thus it does not impact
logging timing.

Direct dependencies

LOG || (LOG_MODE_DEFERRED && !LOG_MINIMAL && !LOG_FRONTEND && !LOG_MINIMAL && LOG)

(Includes any dependencies from ifs and menus.)

Defaults

Kconfig definitions

At <Zephyr>/boards/xtensa/esp32/Kconfig.defconfig:15

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:18

Menu path: (Top)

config LOG_DETECT_MISSED_STRDUP
    bool
    default n
    depends on LOG

At <Zephyr>/subsys/logging/Kconfig.processing:105

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:34<Zephyr>/subsys/Kconfig:31<Zephyr>/subsys/logging/Kconfig:21

Menu path: (Top) → Sub Systems and OS Services → Logging → Processing

config LOG_DETECT_MISSED_STRDUP
    bool "Detect missed handling of transient strings"
    default y if !LOG_IMMEDIATE
    depends on LOG_MODE_DEFERRED && !LOG_MINIMAL && !LOG_FRONTEND && !LOG_MINIMAL && LOG
    help
      If enabled, logger will assert and log error message is it detects
      that string format specifier (%s) and string address which is not from
      read only memory section and not from pool used for string duplicates.
      String argument must be duplicated in that case using log_strdup().
      Detection is performed during log processing thus it does not impact
      logging timing.

(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)