在地址映射区域的权限错误

Valgrind program is crashing Bad permissions for mapped region at address

本文关键字:权限 错误 区域 地址映射      更新时间:2023-10-16

我试图运行我的程序来检查我的程序中的内存泄漏,但每当我启动我的程序,我得到

==3476== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==3476== Bad permissions for mapped region at address 0xCFE3FF8
==3476==    at 0x005212e1: get_document_root (mongoose.c:1557)
==3476==

==3476== HEAP SUMMARY:
==3476== in use at exit: 2,134,492 bytes in 3,948 blocks
==3476== total heap usage: 5,473 allocs, 1,525 frees, 2,863,520 bytes allocated
==3476==

和在完整的valgrind日志中,没有对内存进行无效的读写。我不明白为什么它会崩溃。

由于自定义404页面而该文件不在那里而崩溃。所以它会无限地查找那个文件并导致缓冲区溢出。