由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - 请问在Unix下面的C++程序Bus Error是什么错?
相关主题
UNIX vs LINUX? why?Help Bus error
bad root shell?Solaris on i386
做一个PROJECT,教授需要RCS怎样创造一个 segv (转载)
about Sun Workstationscoconut 申请 unix BZ
Is there a command to know speed of CPU in Unix[转载] Re: 请问unix下如何编写图形界面
急!unix 好像是down掉了C++ Help under UNIX
新手求教How to send email in C program.
有没有sun unix的高手呀?How to debug C program in Unix
相关话题的讨论汇总
话题: bus话题: error话题: pointer话题: your话题: unix
进入Unix版参与讨论
1 (共1页)
l******t
发帖数: 108
1
谢谢
b*****d
发帖数: 1
2
还是哪里的的空间没有分配对吧
再仔细瞅瞅

【在 l******t 的大作中提到】
: 谢谢
t****n
发帖数: 1347
3
Usually it is using a unalloacated pointer.

【在 l******t 的大作中提到】
: 谢谢
m*****e
发帖数: 4193
4
Bus error is generated whenever there is an error in the bus. It's
architecture dependent.
On some architectures (SPARC, for example), variables have to be aligned.
For instance, an int has to be stored at 4-byte boundary, otherwise you
will get a bus error when you try to access it.
This usually happens for the following reasons:
1) Your pointer has a wrong value.
2) Your pointer has a wrong type, esp. when you cast the pointer from a
shorter type to a longer one and violate the alignment r

【在 l******t 的大作中提到】
: 谢谢
1 (共1页)
进入Unix版参与讨论
相关主题
How to debug C program in UnixIs there a command to know speed of CPU in Unix
What's C++ compliler on Tru64 Unix?急!unix 好像是down掉了
关于CPU时间急问!新手求教
Unix上C++函数求救有没有sun unix的高手呀?
UNIX vs LINUX? why?Help Bus error
bad root shell?Solaris on i386
做一个PROJECT,教授需要RCS怎样创造一个 segv (转载)
about Sun Workstationscoconut 申请 unix BZ
相关话题的讨论汇总
话题: bus话题: error话题: pointer话题: your话题: unix