logging: Add option to detect missed transient string duplication
Added CONFIG_LOG_DETECT_MISSED_STRDUP (by default on) which enables scanning of log message strings in search for %s and reports if string address is not from strdup buffer pool and outside read only memory section which indicates that log_strdup() wrapping is missing Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
d6176f8697
commit
a211afb041
4 changed files with 139 additions and 2 deletions
|
@ -535,7 +535,7 @@ void log_generic(struct log_msg_ids src_level, const char *fmt, va_list ap);
|
|||
*
|
||||
* @return True if address within the pool, false otherwise.
|
||||
*/
|
||||
bool log_is_strdup(void *buf);
|
||||
bool log_is_strdup(const void *buf);
|
||||
|
||||
/** @brief Free allocated buffer.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue