質問編集履歴
2
えらー情報
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,7 +5,16 @@
|
|
5
5
|
その結果ある程度バグを見つられたのですが,possibly lostがどうしても消えません.
|
6
6
|
また同じエラーが白紙のプログラムでも発生することがわかりました
|
7
7
|
|
8
|
-
|
8
|
+
==81429== Memcheck, a memory error detector
|
9
|
+
==81429== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
|
10
|
+
==81429== Using Valgrind-3.14.0.GIT and LibVEX; rerun with -h for copyright info
|
11
|
+
==81429== Command: ./a.out
|
12
|
+
==81429==
|
13
|
+
==81429==
|
14
|
+
==81429== HEAP SUMMARY:
|
15
|
+
==81429== in use at exit: 18,339 bytes in 163 blocks
|
16
|
+
==81429== total heap usage: 184 allocs, 21 frees, 26,787 bytes allocated
|
17
|
+
==81429==
|
9
18
|
==81429== 72 bytes in 3 blocks are possibly lost in loss record 26 of 42
|
10
19
|
==81429== at 0x1000ABC32: calloc (in /usr/local/Cellar/valgrind/HEAD-2b0aa0a/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
|
11
20
|
==81429== by 0x1007787E2: map_images_nolock (in /usr/lib/libobjc.A.dylib)
|
@@ -30,9 +39,9 @@
|
|
30
39
|
==81429== To see them, rerun with: --leak-check=full --show-leak-kinds=all
|
31
40
|
==81429==
|
32
41
|
|
42
|
+
==81429== For counts of detected and suppressed errors, rerun with: -v
|
43
|
+
==81429== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 12 from 12)
|
33
44
|
|
34
|
-
|
35
|
-
|
36
45
|
どなたか理由・対策をご存知でしたら教えてください.
|
37
46
|
|
38
47
|
|
@@ -45,12 +54,8 @@
|
|
45
54
|
}
|
46
55
|
```
|
47
56
|
|
48
|
-
#include<stdio.h>
|
49
|
-
#include<stdlib.h>
|
50
|
-
int main(void){
|
51
|
-
return 0;
|
52
|
-
}
|
53
57
|
|
58
|
+
|
54
59
|
###試したこと
|
55
60
|
--gen-suppressions オプションというのを検索で見つけたのですが,よくわかりませんでした.特にsuppressionファイルの作成の仕方がわかりませんでした
|
56
61
|
|
1
エラー情報
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,6 +5,34 @@
|
|
5
5
|
その結果ある程度バグを見つられたのですが,possibly lostがどうしても消えません.
|
6
6
|
また同じエラーが白紙のプログラムでも発生することがわかりました
|
7
7
|
|
8
|
+
|
9
|
+
==81429== 72 bytes in 3 blocks are possibly lost in loss record 26 of 42
|
10
|
+
==81429== at 0x1000ABC32: calloc (in /usr/local/Cellar/valgrind/HEAD-2b0aa0a/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
|
11
|
+
==81429== by 0x1007787E2: map_images_nolock (in /usr/lib/libobjc.A.dylib)
|
12
|
+
==81429== by 0x10078B7DA: objc_object::sidetable_retainCount() (in /usr/lib/libobjc.A.dylib)
|
13
|
+
==81429== by 0x100006C64: dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*), bool, bool) (in /usr/lib/dyld)
|
14
|
+
==81429== by 0x100006E39: dyld::registerObjCNotifiers(void (*)(unsigned int, char const* const*, mach_header const* const*), void (*)(char const*, mach_header const*), void (*)(char const*, mach_header const*)) (in /usr/lib/dyld)
|
15
|
+
==81429== by 0x10024371D: _dyld_objc_notify_register (in /usr/lib/system/libdyld.dylib)
|
16
|
+
==81429== by 0x100778075: _objc_init (in /usr/lib/libobjc.A.dylib)
|
17
|
+
==81429== by 0x1001CDB34: _os_object_init (in /usr/lib/system/libdispatch.dylib)
|
18
|
+
==81429== by 0x1001CDB1B: libdispatch_init (in /usr/lib/system/libdispatch.dylib)
|
19
|
+
==81429== by 0x1000BA9C2: libSystem_initializer (in /usr/lib/libSystem.B.dylib)
|
20
|
+
==81429== by 0x100018AC5: ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
|
21
|
+
==81429== by 0x100018CF5: ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
|
22
|
+
==81429==
|
23
|
+
==81429== LEAK SUMMARY:
|
24
|
+
==81429== definitely lost: 0 bytes in 0 blocks
|
25
|
+
==81429== indirectly lost: 0 bytes in 0 blocks
|
26
|
+
==81429== possibly lost: 72 bytes in 3 blocks
|
27
|
+
==81429== still reachable: 200 bytes in 6 blocks
|
28
|
+
==81429== suppressed: 18,067 bytes in 154 blocks
|
29
|
+
==81429== Reachable blocks (those to which a pointer was found) are not shown.
|
30
|
+
==81429== To see them, rerun with: --leak-check=full --show-leak-kinds=all
|
31
|
+
==81429==
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
|
8
36
|
どなたか理由・対策をご存知でしたら教えてください.
|
9
37
|
|
10
38
|
|