2016-04-13 7 views
0

最近、XCode 7で導入されたと思われるXCode AddressSanitizer(例:Apple WWDC presentationを参照)を使用して奇妙なエラーを見つけるのを始めました。 Sanitizerは実際に問題を発見しましたが、私はそれが意味することを解釈するのは難しいです。XCode AddressSanitizerの結果の解釈

AddressSanitizerが報告できるエラーの種類とその説明の概要を知っていますか?

[CATransaction commit]; 

報告されたエラーがある:私の特定の場合には

は、エラーが最終的に私のコードから発信さ、奥のiOSライブラリが報告され
==820==ERROR: AddressSanitizer failed to allocate 0x4b8000 (4947968) bytes of LargeMmapAllocator (error code: 12) 
==820==Process memory map follows: 
    0x0193820000-0x019383d000 /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 
    0x019fb17000-0x019fb17020 /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 

    ... very long list of mapped memory ... 

==820==End of process memory map. 
==820==AddressSanitizer CHECK failed: /Library/Caches/com.apple.xbs/Sources/clang/clang-703.0.29/src/projects/compiler-rt/lib/sanitizer_common/sanitizer_common.cc:181 "((0 && "unable to mmap")) != (0)" (0x0, 0x0) 
ERROR: Failed to mmap 
AddressSanitizer report breakpoint hit. Use 'thread info -s' to get extended information about the report. 
(lldb) thread info -s 
thread #1: tid = 0x993ca, 0x0000000100994010 libclang_rt.asan_ios_dynamic.dylib`__asan::AsanDie(), queue = 'com.apple.main-thread' 

は誰もが知ってい

何、この特定のエラー手段?

+0

ちょうどそれを見て、それはあなたが記憶を使い果たしたようです。それは可能ですか? – matt

+0

'コミット 'も面白いです:これはあまり一般的ではありません。 – matt

+0

Aha、AddressSanitizer自体が実際にこのエラーを引き起こすのは、もっと多くのメモリを割り当てる必要があるからです。それは理にかなっていますが、私が見つけようとしていた記憶上の問題ではありません。 – fishinear

答えて

1

AddressSanitizerはカスタムメモリアロケータを使用しており、この特定のケースではメモリが不足しています。これは、ASan自身またはあなたのプログラムの問題を必ずしも示すものではありません。

関連する問題