TLB(加载字)异常是否会因错误的编译器选项使用而引起?

发布于 2024-11-18 23:23:20 字数 232 浏览 9 评论 0原文

我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

柏拉图鍀咏恒 2024-11-25 23:23:20

是的,当使用某些编译器标志编译的代码访问具有某些属性的内存时,某些处理器架构会抛出 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文