buserror什么意思,buserr是什么意思
Linux下iconv bus error该如何解决
bus error 是总线错误,这个错误一般是程序无法有效兼容当前 CPU 的工作而报错。
这只能删了这个软件重新装。
如何解决bus error
在x86+Linux上写的程序,在PC机上运行得很好。可是使用ARM的gcc进行交叉编译,再送到DaVinci目标板上运行的时候,出现了Bus error。
出现的位置如下(其中Debug的内容是我在程序中添加的调试信息):
root@211.69.193.189:~# arm_v5t_le-gcc -g shit.c
root@211.69.193.189:~# ./a.out
Debug: malloc space for the actual data: temp_buf = 0x13118
Debug: in my_recvn()
Debug: nleft = 52
Bus error
打开调试器进行调试:
root@211.69.193.189:~# gdb a.out
GNU gdb 6.3 (MontaVista 6.3-20.0.22.0501131 2005-07-22)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "armv5tl-montavista-linuxeabi"...Using host libthread_db library "/lib/tls/libthread_db.so.1".
万能的大神们啊,为什么是bus error ?C语言
你的C语言程序我帮你改完了,出现bus error的原因是循环变量b,你使用了unsigned int类型,改成int类型,就没问题了.另外,reverse_bits函数没有返回值,应该定义为void reverse_bits(unsigned int value);
完整的C语言程序如下
#includestdio.h
void?reverse_bits(unsigned?int?value);
int?main()
{
?unsigned?int?a=25,b;
?reverse_bits(a);
?//?printf("%u",b);
?return?0;
?}
void?reverse_bits(unsigned?int?value)
{
?unsigned?int?a=sizeof?(value);
?int?b;
?int?num[4*sizeof?(value)];
?for?(b=a*4-1;b=0;b--)
??num[b]=((valueb)1);
?for?(b=0;b4*a;b++)
??printf("%d",num[b]);
}?
运行结果
1001100000000000
Bus Error 中Bus Error什么意思
对于要求整数必须存储于特定边界的机器,如果这种类型的数据在内存中的存储地址处在错误的边界上,那么对这个地址访问就会产生总线错误。
