【发布时间】:2011-09-24 08:12:21
【问题描述】:
我正在尝试运行我的程序来检查我的程序中的内存泄漏,但是每当我启动我的程序时,我就会得到 p>
==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 日志中,您在内存上没有无效的读取或写入。 我无法理解为什么它会崩溃。
【问题讨论】:
-
您是否尝试查看 mongoose.c 的第 1557 行?
-
@Paul R 即行 root = next_option(conn->ctx->config[DOCUMENT_ROOT], document_root, NULL);来自code.google.com/p/mongoose/downloads/…
-
太棒了-应该是一个容易修复的错误!
-
但我没有发现任何意外。
-
使用调试器 - 在该行设置断点 - 查看传递给 next_option 的参数。
标签: c++ memory-management valgrind memcheck