功能结束时的分段错误... [英] Segmentation fault when function ends...

查看:73
本文介绍了功能结束时的分段错误...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我有一个类成员,它调用来自同一个类的另一个成员。我遇到的

问题是嵌套函数执行正常,但

会在退出时导致分段错误。我已经在

代码中跟踪了嵌套函数之后的行,或者

相反地在最后一行之后。嵌套功能。


我的问题可能是什么?我希望有人可以给我一些指导

要检查什么样的东西。我甚至无法想到从哪里开始。


d

Hello all,

I have a class member, which calls another member from the same class. The
problem I''m experiencing is that the nested function executes fine, but
causes a segmentation fault as it exits. I''ve traced it to the point in the
code just before the line following the nested function is to be called, or
conversely right after the last line of the nested function.

What might be my problem? I''m hoping someone can give me some guidance on
what sort of things to check. I can''t even think where to start.

d

推荐答案

deancoo写道:
deancoo wrote:
我有一个类成员,它调用同一个类中的另一个成员。我遇到的问题是嵌套函数执行正常,但
会在退出时导致分段错误。我已经在嵌套函数之后的行之前跟踪了
代码中的点,或者相反地在嵌套函数的最后一行之后。
<什么可能是我的问题?我希望有人能给我一些关于
要检查的东西的指导。我甚至无法想到从哪里开始。
I have a class member, which calls another member from the same class. The
problem I''m experiencing is that the nested function executes fine, but
causes a segmentation fault as it exits. I''ve traced it to the point in the
code just before the line following the nested function is to be called, or
conversely right after the last line of the nested function.

What might be my problem? I''m hoping someone can give me some guidance on
what sort of things to check. I can''t even think where to start.




听起来像花园种类的内存溢出问题。你最有可能踩到你的
自己的调用堆栈。检查超出数组范围的写作。


V



Sounds like a garden variety memory overrun problem. You stomp over your
own call stack, most likely. Check writing beyond the bounds of an array.

V


deancoo schrieb:
deancoo schrieb:
大家好,

我有一个类成员,它调用同一个类中的另一个成员。我遇到的问题是嵌套函数执行正常,但
会在退出时导致分段错误。我已经在嵌套函数之后的行之前跟踪了
代码中的点,或者相反地在嵌套函数的最后一行之后。
<什么可能是我的问题?我希望有人能给我一些关于
要检查的东西的指导。我甚至无法想到从哪里开始。
Hello all,

I have a class member, which calls another member from the same class. The
problem I''m experiencing is that the nested function executes fine, but
causes a segmentation fault as it exits. I''ve traced it to the point in the
code just before the line following the nested function is to be called, or
conversely right after the last line of the nested function.

What might be my problem? I''m hoping someone can give me some guidance on
what sort of things to check. I can''t even think where to start.




你已经以某种方式破坏了你的堆栈。

寻找数组上的溢出堆栈等。



you''ve corrupted your stack somehow.
look for overflows in arrays on the stack and the like.




" deancoo" < S2 ******* @ yahoo.ca>在消息中写道

news:UhB2e.134778

"deancoo" <s2*******@yahoo.ca> wrote in message
news:UhB2e.134778


这篇关于功能结束时的分段错误...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆