-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalgrind.out
More file actions
224 lines (224 loc) · 14.2 KB
/
valgrind.out
File metadata and controls
224 lines (224 loc) · 14.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
==7515== Memcheck, a memory error detector
==7515== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==7515== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==7515== Command: ./simplesh
==7515==
--7515-- Valgrind options:
--7515-- --leak-check=full
--7515-- --show-leak-kinds=all
--7515-- --suppressions=libreadline.supp
--7515-- --trace-children=no
--7515-- --child-silent-after-fork=yes
--7515-- -v
--7515-- Contents of /proc/version:
--7515-- Linux version 4.15.0-65-generic (buildd@lgw01-amd64-006) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019
--7515--
--7515-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-avx-avx2-bmi
--7515-- Page sizes: currently 4096, max supported 4096
--7515-- Valgrind library directory: /usr/lib/valgrind
--7515-- Reading syms from /home/alex/Escritorio/ING.Informática/3ºAÑO/ASO/Simplesh/ASO/simplesh
--7515-- Reading syms from /lib/x86_64-linux-gnu/ld-2.27.so
--7515-- Considering /lib/x86_64-linux-gnu/ld-2.27.so ..
--7515-- .. CRC mismatch (computed 1b7c895e wanted 2943108a)
--7515-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.27.so ..
--7515-- .. CRC is valid
--7515-- Reading syms from /usr/lib/valgrind/memcheck-amd64-linux
--7515-- Considering /usr/lib/valgrind/memcheck-amd64-linux ..
--7515-- .. CRC mismatch (computed c25f395c wanted 0a9602a8)
--7515-- object doesn't have a symbol table
--7515-- object doesn't have a dynamic symbol table
--7515-- Scheduler: using generic scheduler lock implementation.
--7515-- Reading suppressions file: libreadline.supp
--7515-- Reading suppressions file: /usr/lib/valgrind/default.supp
==7515== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-7515-by-alex-on-???
==7515== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-7515-by-alex-on-???
==7515== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-7515-by-alex-on-???
==7515==
==7515== TO CONTROL THIS PROCESS USING vgdb (which you probably
==7515== don't want to do, unless you know exactly what you're doing,
==7515== or are doing some strange experiment):
==7515== /usr/lib/valgrind/../../bin/vgdb --pid=7515 ...command...
==7515==
==7515== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==7515== /path/to/gdb ./simplesh
==7515== and then give GDB the following command
==7515== target remote | /usr/lib/valgrind/../../bin/vgdb --pid=7515
==7515== --pid is optional if only one valgrind process is running
==7515==
--7515-- REDIR: 0x401f2f0 (ld-linux-x86-64.so.2:strlen) redirected to 0x58060901 (???)
--7515-- REDIR: 0x401f0d0 (ld-linux-x86-64.so.2:index) redirected to 0x5806091b (???)
--7515-- Reading syms from /usr/lib/valgrind/vgpreload_core-amd64-linux.so
--7515-- Considering /usr/lib/valgrind/vgpreload_core-amd64-linux.so ..
--7515-- .. CRC mismatch (computed 4b63d83e wanted 670599e6)
--7515-- object doesn't have a symbol table
--7515-- Reading syms from /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
--7515-- Considering /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so ..
--7515-- .. CRC mismatch (computed a4b37bee wanted 8ad4dc94)
--7515-- object doesn't have a symbol table
==7515== WARNING: new redirection conflicts with existing -- ignoring it
--7515-- old: 0x0401f2f0 (strlen ) R-> (0000.0) 0x58060901 ???
--7515-- new: 0x0401f2f0 (strlen ) R-> (2007.0) 0x04c32db0 strlen
--7515-- REDIR: 0x401d360 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4c33ee0 (strcmp)
--7515-- REDIR: 0x401f830 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4c374f0 (mempcpy)
--7515-- Reading syms from /lib/x86_64-linux-gnu/libreadline.so.7.0
--7515-- object doesn't have a symbol table
--7515-- Reading syms from /lib/x86_64-linux-gnu/libc-2.27.so
--7515-- Considering /lib/x86_64-linux-gnu/libc-2.27.so ..
--7515-- .. CRC mismatch (computed b1c74187 wanted 042cc048)
--7515-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.27.so ..
--7515-- .. CRC is valid
--7515-- Reading syms from /lib/x86_64-linux-gnu/libtinfo.so.5.9
--7515-- object doesn't have a symbol table
--7515-- REDIR: 0x5123c70 (libc.so.6:memmove) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5122d40 (libc.so.6:strncpy) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5123f50 (libc.so.6:strcasecmp) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5122790 (libc.so.6:strcat) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5122d70 (libc.so.6:rindex) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x51257c0 (libc.so.6:rawmemchr) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5123de0 (libc.so.6:mempcpy) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5123c10 (libc.so.6:bcmp) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5122d00 (libc.so.6:strncmp) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5122800 (libc.so.6:strcmp) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5123d40 (libc.so.6:memset) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x51410f0 (libc.so.6:wcschr) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5122ca0 (libc.so.6:strnlen) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5122870 (libc.so.6:strcspn) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5123fa0 (libc.so.6:strncasecmp) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5122840 (libc.so.6:strcpy) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x51240e0 (libc.so.6:memcpy@@GLIBC_2.14) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5122da0 (libc.so.6:strpbrk) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x51227c0 (libc.so.6:index) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5122c70 (libc.so.6:strlen) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x512d6c0 (libc.so.6:memrchr) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5123ff0 (libc.so.6:strcasecmp_l) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5123be0 (libc.so.6:memchr) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5141eb0 (libc.so.6:wcslen) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5123050 (libc.so.6:strspn) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5123f20 (libc.so.6:stpncpy) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5123ef0 (libc.so.6:stpcpy) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x51257f0 (libc.so.6:strchrnul) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5124040 (libc.so.6:strncasecmp_l) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5122cd0 (libc.so.6:strncat) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x51b68a0 (libc.so.6:__memcpy_chk) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x5123b20 (libc.so.6:strstr) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--7515-- REDIR: 0x52133c0 (libc.so.6:__strrchr_avx2) redirected to 0x4c32730 (rindex)
--7515-- REDIR: 0x5213f50 (libc.so.6:__memset_avx2_unaligned_erms) redirected to 0x4c365d0 (memset)
--7515-- REDIR: 0x5213590 (libc.so.6:__strlen_avx2) redirected to 0x4c32cf0 (strlen)
--7515-- REDIR: 0x511c070 (libc.so.6:malloc) redirected to 0x4c2faa0 (malloc)
--7515-- REDIR: 0x5123590 (libc.so.6:__GI_strstr) redirected to 0x4c37760 (__strstr_sse2)
--7515-- REDIR: 0x520f420 (libc.so.6:__memchr_avx2) redirected to 0x4c33f80 (memchr)
--7515-- REDIR: 0x5213ad0 (libc.so.6:__memcpy_avx_unaligned_erms) redirected to 0x4c366e0 (memmove)
--7515-- REDIR: 0x52131d0 (libc.so.6:__strchrnul_avx2) redirected to 0x4c37020 (strchrnul)
--7515-- REDIR: 0x5213ab0 (libc.so.6:__mempcpy_avx_unaligned_erms) redirected to 0x4c37130 (mempcpy)
--7515-- REDIR: 0x52115f0 (libc.so.6:__strncasecmp_avx) redirected to 0x4c336d0 (strncasecmp)
--7515-- REDIR: 0x511c950 (libc.so.6:free) redirected to 0x4c30cd0 (free)
--7515-- REDIR: 0x51eed60 (libc.so.6:__strcmp_ssse3) redirected to 0x4c33da0 (strcmp)
--7515-- REDIR: 0x5204c80 (libc.so.6:__stpcpy_ssse3) redirected to 0x4c35f60 (stpcpy)
--7515-- REDIR: 0x511f030 (libc.so.6:calloc) redirected to 0x4c31a70 (calloc)
--7515-- Reading syms from /lib/x86_64-linux-gnu/libnss_compat-2.27.so
--7515-- Considering /lib/x86_64-linux-gnu/libnss_compat-2.27.so ..
--7515-- .. CRC mismatch (computed afe25112 wanted 3a92b55b)
--7515-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/libnss_compat-2.27.so ..
--7515-- .. CRC is valid
--7515-- REDIR: 0x5200950 (libc.so.6:__strcpy_ssse3) redirected to 0x4c32dd0 (strcpy)
--7515-- Reading syms from /lib/x86_64-linux-gnu/libnss_nis-2.27.so
--7515-- Considering /lib/x86_64-linux-gnu/libnss_nis-2.27.so ..
--7515-- .. CRC mismatch (computed 310534dc wanted 22d60ee8)
--7515-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/libnss_nis-2.27.so ..
--7515-- .. CRC is valid
--7515-- Reading syms from /lib/x86_64-linux-gnu/libnsl-2.27.so
--7515-- Considering /lib/x86_64-linux-gnu/libnsl-2.27.so ..
--7515-- .. CRC mismatch (computed 5dfb2e24 wanted a9b787f5)
--7515-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/libnsl-2.27.so ..
--7515-- .. CRC is valid
--7515-- Reading syms from /lib/x86_64-linux-gnu/libnss_files-2.27.so
--7515-- Considering /lib/x86_64-linux-gnu/libnss_files-2.27.so ..
--7515-- .. CRC mismatch (computed 5cdb0f74 wanted 1b4e69e7)
--7515-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/libnss_files-2.27.so ..
--7515-- .. CRC is valid
--7515-- REDIR: 0x5212fa0 (libc.so.6:__strchr_avx2) redirected to 0x4c32950 (index)
--7515-- REDIR: 0x520a510 (libc.so.6:__strncmp_sse42) redirected to 0x4c33570 (__strncmp_sse42)
--7515-- REDIR: 0x5213720 (libc.so.6:__strnlen_avx2) redirected to 0x4c32c90 (strnlen)
--7515-- REDIR: 0x5213ac0 (libc.so.6:__memcpy_chk_avx_unaligned_erms) redirected to 0x4c375e0 (__memcpy_chk)
--7515-- REDIR: 0x511dc30 (libc.so.6:realloc) redirected to 0x4c31cb0 (realloc)
--7515-- REDIR: 0x5202100 (libc.so.6:__strncpy_ssse3) redirected to 0x4c32fb0 (strncpy)
--7515-- REDIR: 0x50c7c50 (libc.so.6:setenv) redirected to 0x4c37de0 (setenv)
--7515-- REDIR: 0x520ff80 (libc.so.6:__strcasecmp_avx) redirected to 0x4c335f0 (strcasecmp)
--7515-- REDIR: 0x520fba0 (libc.so.6:__memcmp_avx2_movbe) redirected to 0x4c35e00 (bcmp)
simplesh.c: ==7515== Invalid read of size 1
==7515== at 0x4C32CF2: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7515== by 0x50E24D2: vfprintf (vfprintf.c:1643)
==7515== by 0x50E367F: buffered_vfprintf (vfprintf.c:2329)
==7515== by 0x50E0725: vfprintf (vfprintf.c:1301)
==7515== by 0x109847: error (simplesh.c:137)
==7515== by 0x109F28: parse_cmd (simplesh.c:493)
==7515== by 0x10DCF0: main (simplesh.c:1920)
==7515== Address 0x7c is not stack'd, malloc'd or (recently) free'd
==7515==
==7515==
==7515== Process terminating with default action of signal 11 (SIGSEGV)
==7515== Access not within mapped region at address 0x7C
==7515== at 0x4C32CF2: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7515== by 0x50E24D2: vfprintf (vfprintf.c:1643)
==7515== by 0x50E367F: buffered_vfprintf (vfprintf.c:2329)
==7515== by 0x50E0725: vfprintf (vfprintf.c:1301)
==7515== by 0x109847: error (simplesh.c:137)
==7515== by 0x109F28: parse_cmd (simplesh.c:493)
==7515== by 0x10DCF0: main (simplesh.c:1920)
==7515== If you believe this happened as a result of a stack
==7515== overflow in your program's main thread (unlikely but
==7515== possible), you can try to increase the size of the
==7515== main thread stack using the --main-stacksize= flag.
==7515== The main thread stack size used in this run was 8388608.
--7515-- Discarding syms at 0x5aa12a0-0x5aa71c4 in /lib/x86_64-linux-gnu/libnss_compat-2.27.so due to munmap()
--7515-- Discarding syms at 0x5cac070-0x5cb30d9 in /lib/x86_64-linux-gnu/libnss_nis-2.27.so due to munmap()
--7515-- Discarding syms at 0x5eba090-0x5ec7807 in /lib/x86_64-linux-gnu/libnsl-2.27.so due to munmap()
--7515-- Discarding syms at 0x60d2350-0x60d8d7f in /lib/x86_64-linux-gnu/libnss_files-2.27.so due to munmap()
==7515==
==7515== HEAP SUMMARY:
==7515== in use at exit: 134,647 bytes in 198 blocks
==7515== total heap usage: 390 allocs, 192 frees, 168,537 bytes allocated
==7515==
==7515== Searching for pointers to 198 not-freed blocks
==7515== Checked 171,264 bytes
==7515==
==7515== 16 bytes in 1 blocks are still reachable in loss record 10 of 48
==7515== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7515== by 0x109BB0: backcmd (simplesh.c:325)
==7515== by 0x109FE5: parse_line (simplesh.c:524)
==7515== by 0x109EE8: parse_cmd (simplesh.c:488)
==7515== by 0x10DCF0: main (simplesh.c:1920)
==7515==
==7515== 272 bytes in 1 blocks are still reachable in loss record 23 of 48
==7515== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7515== by 0x1099AF: execcmd (simplesh.c:248)
==7515== by 0x10A20E: parse_exec (simplesh.c:594)
==7515== by 0x10A0ED: parse_pipe (simplesh.c:555)
==7515== by 0x109F91: parse_line (simplesh.c:515)
==7515== by 0x109EE8: parse_cmd (simplesh.c:488)
==7515== by 0x10DCF0: main (simplesh.c:1920)
==7515==
==7515== LEAK SUMMARY:
==7515== definitely lost: 0 bytes in 0 blocks
==7515== indirectly lost: 0 bytes in 0 blocks
==7515== possibly lost: 0 bytes in 0 blocks
==7515== still reachable: 288 bytes in 2 blocks
==7515== suppressed: 134,359 bytes in 196 blocks
==7515==
==7515== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
==7515==
==7515== 1 errors in context 1 of 1:
==7515== Invalid read of size 1
==7515== at 0x4C32CF2: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7515== by 0x50E24D2: vfprintf (vfprintf.c:1643)
==7515== by 0x50E367F: buffered_vfprintf (vfprintf.c:2329)
==7515== by 0x50E0725: vfprintf (vfprintf.c:1301)
==7515== by 0x109847: error (simplesh.c:137)
==7515== by 0x109F28: parse_cmd (simplesh.c:493)
==7515== by 0x10DCF0: main (simplesh.c:1920)
==7515== Address 0x7c is not stack'd, malloc'd or (recently) free'd
==7515==
--7515--
--7515-- used_suppression: 46 libreadline libreadline.supp:2 suppressed: 134,359 bytes in 196 blocks
==7515==
==7515== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)