heap_caps_malloc(n, MALLOC_CAP_EXEC) returns non-executable memory on ESP32-C6 default config (IDFGH-14013) #14836
Labels
Resolution: NA
Issue resolution is unavailable
Status: Done
Issue is done internally
Type: Bug
bugs in IDF
Answers checklist.
IDF version.
v5.2.3, release/v5.2 branch (v5.2.3-262-g2b35c55820)
Espressif SoC revision.
ESP32-C6FH4 (QFN32) (revision v0.1)
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-C6-DevKitM-1
Power Supply used.
USB
What is the expected behavior?
Calling
heap_caps_malloc(n, MALLOC_CAP_EXEC)
should return NULL or memory which is executable.What is the actual behavior?
On ESP32-C6 with the default configuration,
heap_caps_malloc(n, MALLOC_CAP_EXEC)
returns a pointer to memory which is not executable and crashes on instruction fetch.This bug seems to be fixed on master and release/v5.3 branch, but it would be great if fix could please be backported to v5.2.
Steps to reproduce.
Debug Logs.
More Information.
idf.py menuconfig
and disablingESP_SYSTEM_PMP_IDRAM_SPLIT
causes the returned memory to be executable as expected.The text was updated successfully, but these errors were encountered: