什么是总线错误? [英] What is a bus error?

查看:228
本文介绍了什么是总线错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是总线错误消息的意思,它是如何从一个段错误有什么区别?

What does the "bus error" message mean, and how does it differ from a segfault?

推荐答案

总线错误是在x86时下罕见的,当你的处理器,甚至不能尝试的内存访问请求发生,通常是:

Bus errors are rare nowadays on x86 and occur when your processor cannot even attempt the memory access requested, typically:


  • 使用与不符合其对齐要求地址的处理器指令。

访问不属于你的进程的内存时会出现分段错误,他们是非常常见的,通常的结果:

Segmentation faults occur when accessing memory which does not belong to your process, they are very common and are typically the result of:


  • 使用指针的东西,被释放。

  • 使用未初始化的,因此假的指针。

  • 用一个空指针。

  • 溢出的缓冲区。

PS:为了更precise这不是操纵指针本身会导致一些问题,它的访问它指向的内存(提领)

PS: To be more precise this is not manipulating the pointer itself that will cause issues, it's accessing the memory it points to (dereferencing).

这篇关于什么是总线错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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