[英]Compiling with LLVM/Clang causes crash, not GCC 4.2
我正在開發iPhone應用程序,遇到了一些編譯器問題。 這是低點:
當它失敗時,該應用程序甚至無法完成加載。 日志如下所示:
run
Running…
[Switching to thread 11523]
[Switching to thread 11523]
sharedlibrary apply-load-rules all
continue
Program received signal: “EXC_BAD_ACCESS”.
warning: check_safe_call: could not restore current frame
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
我不知道這是怎么回事。 我真的很想更新代碼,以使用WWDC宣布的最新功能(隱式@synthesize
,在類別中添加實例變量的功能等),但是Clang是必需的。
看起來像是內存中積蓄的東西。 更具體地說,在堆棧上。
LLVM和GCC之間在代碼源方面存在一些相當顯着的(盡管完全是微妙的)差異。 請記住,LLVM-GCC實際上是GCC-> LLVM; 也就是說,GCC解析器為LLVM代碼生成引擎提供了動力。
因此,我懷疑您遇到了一個非常可愛的案例。 LLVM的代碼生成中的錯誤或程序中表現為這種崩潰的錯誤。
我想不到,我無法想象-復制一個塊然后在另一個線程上執行該塊可能會導致像這樣的崩潰。
無論如何,請盡可能提交錯誤。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.