当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 2 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 寻求帮忙解决一下valgrind错误
帖子发表于 : 2010-09-09 12:32 

注册: 2009-09-15 18:34
帖子: 30
送出感谢: 0 次
接收感谢: 0 次
我用C写了个程序,但用valgrind检查总是出错。请大家帮我看看吧
(注:Uori是我写的一个class)


==3083== Memcheck, a memory error detector
==3083== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==3083== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==3083== Command: ./grp
==3083==
==3083== Warning: client switching stacks? SP change: 0x7feffffc8 --> 0x7fe6e86c0
==3083== to suppress, use: --max-stackframe=9533704 or greater
==3083== Invalid write of size 8
==3083== at 0x409A51: GRPscheme(Uori***, Uori***, Uori***, Uori***, Uori***, Uori***, Uori***) (grpalgorithm.cpp:3)
==3083== by 0x40F205: main (GRP3d.cpp:101)
==3083== Address 0x7fe6e8738 is on thread 1's stack
==3083==
==3083==
==3083== Process terminating with default action of signal 11 (SIGSEGV)
==3083== Access not within mapped region at address 0x7FE6E8738
==3083== at 0x409A51: GRPscheme(Uori***, Uori***, Uori***, Uori***, Uori***, Uori***, Uori***) (grpalgorithm.cpp:3)
==3083== If you believe this happened as a result of a stack
==3083== overflow in your program's main thread (unlikely but
==3083== possible), you can try to increase the size of the
==3083== main thread stack using the --main-stacksize= flag.
==3083== The main thread stack size used in this run was 8388608.
==3083==
==3083== Process terminating with default action of signal 11 (SIGSEGV)
==3083== Access not within mapped region at address 0x7FE6E86B8
==3083== at 0x4A2369F: _vgnU_freeres (vg_preloaded.c:58)
==3083== If you believe this happened as a result of a stack
==3083== overflow in your program's main thread (unlikely but
==3083== possible), you can try to increase the size of the
==3083== main thread stack using the --main-stacksize= flag.
==3083== The main thread stack size used in this run was 8388608.
==3083==
==3083== HEAP SUMMARY:
==3083== in use at exit: 66,950,576 bytes in 27,349 blocks
==3083== total heap usage: 27,349 allocs, 0 frees, 66,950,576 bytes allocated
==3083==
==3083== LEAK SUMMARY:
==3083== definitely lost: 0 bytes in 0 blocks
==3083== indirectly lost: 0 bytes in 0 blocks
==3083== possibly lost: 0 bytes in 0 blocks
==3083== still reachable: 66,950,576 bytes in 27,349 blocks
==3083== suppressed: 0 bytes in 0 blocks
==3083== Rerun with --leak-check=full to see details of leaked memory
==3083==
==3083== For counts of detected and suppressed errors, rerun with: -v
==3083== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 4 from 4)
段错误


页首
 用户资料  
 
2 楼 
 文章标题 : Re: 寻求帮忙解决一下valgrind错误
帖子发表于 : 2010-09-13 11:15 
头像

注册: 2009-07-07 19:52
帖子: 240
送出感谢: 0 次
接收感谢: 0 次
程序崩溃了,你不贴代码,大家咋帮你呢。


_________________
阿呆 : 天下第一呆!


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 2 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 3 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译