TLB(加载字)异常是否会因错误的编译器选项使用而引起?
我在 VxWorks 中遇到 TLB(加载字或指令获取)异常。当我进一步分析时,我了解到所引用的内存地址并不指向有效的内存位置。
据我了解,这个问题可能是由于某些内存损坏(可能是内存覆盖)而发生的。但是,在 purify 下对代码进行分析并在 Windows 中执行同一段代码并没有显示任何内存错误。
所以,我想知道是否有任何编译器选项可能导致此问题?是否可以?
另外,有关于如何调试此类问题的指示吗?
I am getting a TLB (Load Word or Instruction Fetch) exception in VxWorks. When I analyze further I understood that the memory address which is being referred doesn't point to a valid memory location.
As far as I understand, this problem could be happening because of some memory corruption (possible memory overwrite). But, analysis of code and execution of the same piece of code in Windows under purify doesn't show any memory errors.
So, I am wondering if any compiler options could be causing this? Is it possible?
Also, any pointers for how to debug such issues?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,当使用某些编译器标志编译的代码访问具有某些属性的内存时,某些处理器架构会抛出 TLB 异常。例如,未缓存内存上的 PowerPC 具有编译器标志,可导致对未对齐数据的对齐访问。
是的,但如果没有其他信息,“是”对您没有帮助。
Yes, certain processor architectures and throw TLB exception when code compiled with certain compiler flags access memory with certain attributes. e.g. PowerPC on uncached memory with compiler flags that lead to aligned access to unaligned data.
Yes, but without additional information "Yes" is not helpful for you.