Clang: 如何查看 ud2 指令生成的位置和原因?

huangapple go评论79阅读模式
英文:

Clang: How do I see where and why an ud2 instruction was generated?

问题

Clang在我的一个非常大的项目中似乎会在某些函数调用中插入ud2指令。然而,即使使用了-Wall选项,它似乎也没有告诉我原因。在该项目中,我非常频繁地使用协程,但ud2指令最终出现在非协程函数调用中。

提前感谢<br>
Tuxifan

英文:

In a really big project of mine, Clang seems to throw in ud2 instructions at some function calls. However, even with -Wall it doesn't seem to tell me why. I am using coroutines quite heavily in that project, but the ud2 instructions end up at non-coroutine function calls.

Thanks in advance<br>
Tuxifan

答案1

得分: 0

Clang将ud2指令放置在任何可能导致未定义行为的位置。这样做是不可行的。

英文:

Clang places ud2 instruction at whatever place that would be undefined behavior to reach. Doing this is not feasible.

huangapple
  • 本文由 发表于 2023年5月6日 15:29:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/76187657.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定