質問編集履歴

2

えらー情報

2018/08/21 11:04

投稿

valgrind_val
valgrind_val

スコア13

test CHANGED
File without changes
test CHANGED
@@ -12,7 +12,25 @@
12
12
 
13
13
 
14
14
 
15
+ ==81429== Memcheck, a memory error detector
15
16
 
17
+ ==81429== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
18
+
19
+ ==81429== Using Valgrind-3.14.0.GIT and LibVEX; rerun with -h for copyright info
20
+
21
+ ==81429== Command: ./a.out
22
+
23
+ ==81429==
24
+
25
+ ==81429==
26
+
27
+ ==81429== HEAP SUMMARY:
28
+
29
+ ==81429== in use at exit: 18,339 bytes in 163 blocks
30
+
31
+ ==81429== total heap usage: 184 allocs, 21 frees, 26,787 bytes allocated
32
+
33
+ ==81429==
16
34
 
17
35
  ==81429== 72 bytes in 3 blocks are possibly lost in loss record 26 of 42
18
36
 
@@ -62,9 +80,9 @@
62
80
 
63
81
 
64
82
 
83
+ ==81429== For counts of detected and suppressed errors, rerun with: -v
65
84
 
66
-
85
+ ==81429== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 12 from 12)
67
-
68
86
 
69
87
 
70
88
 
@@ -92,15 +110,7 @@
92
110
 
93
111
 
94
112
 
95
- #include<stdio.h>
96
113
 
97
- #include<stdlib.h>
98
-
99
- int main(void){
100
-
101
- return 0;
102
-
103
- }
104
114
 
105
115
 
106
116
 

1

エラー情報

2018/08/21 11:04

投稿

valgrind_val
valgrind_val

スコア13

test CHANGED
File without changes
test CHANGED
@@ -9,6 +9,62 @@
9
9
  その結果ある程度バグを見つられたのですが,possibly lostがどうしても消えません.
10
10
 
11
11
  また同じエラーが白紙のプログラムでも発生することがわかりました
12
+
13
+
14
+
15
+
16
+
17
+ ==81429== 72 bytes in 3 blocks are possibly lost in loss record 26 of 42
18
+
19
+ ==81429== at 0x1000ABC32: calloc (in /usr/local/Cellar/valgrind/HEAD-2b0aa0a/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
20
+
21
+ ==81429== by 0x1007787E2: map_images_nolock (in /usr/lib/libobjc.A.dylib)
22
+
23
+ ==81429== by 0x10078B7DA: objc_object::sidetable_retainCount() (in /usr/lib/libobjc.A.dylib)
24
+
25
+ ==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)
26
+
27
+ ==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)
28
+
29
+ ==81429== by 0x10024371D: _dyld_objc_notify_register (in /usr/lib/system/libdyld.dylib)
30
+
31
+ ==81429== by 0x100778075: _objc_init (in /usr/lib/libobjc.A.dylib)
32
+
33
+ ==81429== by 0x1001CDB34: _os_object_init (in /usr/lib/system/libdispatch.dylib)
34
+
35
+ ==81429== by 0x1001CDB1B: libdispatch_init (in /usr/lib/system/libdispatch.dylib)
36
+
37
+ ==81429== by 0x1000BA9C2: libSystem_initializer (in /usr/lib/libSystem.B.dylib)
38
+
39
+ ==81429== by 0x100018AC5: ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
40
+
41
+ ==81429== by 0x100018CF5: ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
42
+
43
+ ==81429==
44
+
45
+ ==81429== LEAK SUMMARY:
46
+
47
+ ==81429== definitely lost: 0 bytes in 0 blocks
48
+
49
+ ==81429== indirectly lost: 0 bytes in 0 blocks
50
+
51
+ ==81429== possibly lost: 72 bytes in 3 blocks
52
+
53
+ ==81429== still reachable: 200 bytes in 6 blocks
54
+
55
+ ==81429== suppressed: 18,067 bytes in 154 blocks
56
+
57
+ ==81429== Reachable blocks (those to which a pointer was found) are not shown.
58
+
59
+ ==81429== To see them, rerun with: --leak-check=full --show-leak-kinds=all
60
+
61
+ ==81429==
62
+
63
+
64
+
65
+
66
+
67
+
12
68
 
13
69
 
14
70