malloc: Add a Kconfig option for heap protection
Add CONFIG_MCHECK_HEAP_PROTECTION option to enable mcheck heap protection. Convert all uses of MCHECK_HEAP_PROTECTION to use the CONFIG_ -prefixed version to work with Kconfig. Disable this option when tracing is enabled, since the mcheck hooks (mcheck_pedantic_prehook(), etc.) interfere with function tracing. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
@@ -749,7 +749,7 @@ static int setup_reloc(void)
|
||||
if (gd->flags & GD_FLG_SKIP_RELOC) {
|
||||
debug("Skipping relocation due to flag\n");
|
||||
} else {
|
||||
#ifdef MCHECK_HEAP_PROTECTION
|
||||
#ifdef CONFIG_MCHECK_HEAP_PROTECTION
|
||||
mcheck_on_ramrelocation(gd->reloc_off);
|
||||
#endif
|
||||
debug("Relocation Offset is: %08lx\n", gd->reloc_off);
|
||||
|
||||
Reference in New Issue
Block a user