Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ==778== Memcheck, a memory error detector
- ==778== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
- ==778== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
- ==778== Command: ./trab
- ==778== Parent PID: 511
- ==778==
- ==778== Warning: client switching stacks? SP change: 0x1ffefffda0 --> 0x1ffea37f60
- ==778== to suppress, use: --max-stackframe=6061632 or greater
- ==778== Invalid write of size 8
- ==778== at 0x109C8D: main (trab.c:393)
- ==778== Address 0x1ffea37f58 is on thread 1's stack
- ==778== in frame #0, created by main (trab.c:391)
- ==778==
- ==778== Invalid write of size 4
- ==778== at 0x48C6474: __vfscanf_internal (vfscanf-internal.c:1895)
- ==778== by 0x48C1CAA: __isoc99_scanf (isoc99_scanf.c:30)
- ==778== by 0x109C91: main (trab.c:393)
- ==778== Address 0x1ffea37f60 is on thread 1's stack
- ==778== in frame #2, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 8
- ==778== at 0x48C1CC2: __isoc99_scanf (isoc99_scanf.c:34)
- ==778== by 0x109C91: main (trab.c:393)
- ==778== Address 0x1ffea37f58 is on thread 1's stack
- ==778== in frame #0, created by __isoc99_scanf (isoc99_scanf.c:25)
- ==778==
- ==778== Invalid read of size 4
- ==778== at 0x109C92: main (trab.c:396)
- ==778== Address 0x1ffea37f60 is on thread 1's stack
- ==778== in frame #0, created by main (trab.c:391)
- ==778==
- ==778== Invalid write of size 8
- ==778== at 0x10955E: readSentencesWithProducts (trab.c:162)
- ==778== by 0x109CA8: main (trab.c:396)
- ==778== Address 0x1ffea469d0 is on thread 1's stack
- ==778== in frame #1, created by main (trab.c:391)
- ==778==
- ==778== Invalid write of size 4
- ==778== at 0x10957A: readSentencesWithProducts (trab.c:163)
- ==778== by 0x109CA8: main (trab.c:396)
- ==778== Address 0x1ffea55438 is on thread 1's stack
- ==778== in frame #1, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 4
- ==778== at 0x1092D1: addSentenceToProduct (trab.c:86)
- ==778== by 0x1095CB: readSentencesWithProducts (trab.c:168)
- ==778== by 0x109CA8: main (trab.c:396)
- ==778== Address 0x1ffea55438 is on thread 1's stack
- ==778== in frame #2, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 4
- ==778== at 0x1092E0: addSentenceToProduct (trab.c:87)
- ==778== by 0x1095CB: readSentencesWithProducts (trab.c:168)
- ==778== by 0x109CA8: main (trab.c:396)
- ==778== Address 0x1ffea55438 is on thread 1's stack
- ==778== in frame #2, created by main (trab.c:391)
- ==778==
- ==778== Invalid write of size 1
- ==778== at 0x483BD98: strcpy (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x109308: addSentenceToProduct (trab.c:87)
- ==778== by 0x1095CB: readSentencesWithProducts (trab.c:168)
- ==778== by 0x109CA8: main (trab.c:396)
- ==778== Address 0x1ffea469d8 is on thread 1's stack
- ==778== in frame #3, created by main (trab.c:391)
- ==778==
- ==778== Invalid write of size 1
- ==778== at 0x483BDA7: strcpy (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x109308: addSentenceToProduct (trab.c:87)
- ==778== by 0x1095CB: readSentencesWithProducts (trab.c:168)
- ==778== by 0x109CA8: main (trab.c:396)
- ==778== Address 0x1ffea46a07 is on thread 1's stack
- ==778== in frame #3, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 4
- ==778== at 0x10930D: addSentenceToProduct (trab.c:88)
- ==778== by 0x1095CB: readSentencesWithProducts (trab.c:168)
- ==778== by 0x109CA8: main (trab.c:396)
- ==778== Address 0x1ffea55438 is on thread 1's stack
- ==778== in frame #2, created by main (trab.c:391)
- ==778==
- ==778== Invalid write of size 4
- ==778== at 0x10931A: addSentenceToProduct (trab.c:88)
- ==778== by 0x1095CB: readSentencesWithProducts (trab.c:168)
- ==778== by 0x109CA8: main (trab.c:396)
- ==778== Address 0x1ffea55438 is on thread 1's stack
- ==778== in frame #2, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 8
- ==778== at 0x1094E8: readSentencesWithProducts (trab.c:152)
- ==778== by 0x109CA8: main (trab.c:396)
- ==778== Address 0x1ffea469d0 is on thread 1's stack
- ==778== in frame #1, created by main (trab.c:391)
- ==778==
- ==778== Invalid write of size 4
- ==778== at 0x109CA9: main (trab.c:396)
- ==778== Address 0x1ffea37f6c is on thread 1's stack
- ==778== in frame #0, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 4
- ==778== at 0x109CAF: main (trab.c:399)
- ==778== Address 0x1ffea37f64 is on thread 1's stack
- ==778== in frame #0, created by main (trab.c:391)
- ==778==
- ==778== Invalid write of size 1
- ==778== at 0x48E1210: _IO_getline_info (iogetline.c:77)
- ==778== by 0x48E01AA: fgets (iofgets.c:53)
- ==778== by 0x1093B9: readSentences (trab.c:116)
- ==778== by 0x109CC5: main (trab.c:399)
- ==778== Address 0x1ffea37f70 is on thread 1's stack
- ==778== in frame #3, created by main (trab.c:391)
- ==778==
- ==778== Invalid write of size 1
- ==778== at 0x483F8C1: memmove (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x48E1273: _IO_getline_info (iogetline.c:96)
- ==778== by 0x48E01AA: fgets (iofgets.c:53)
- ==778== by 0x1093B9: readSentences (trab.c:116)
- ==778== by 0x109CC5: main (trab.c:399)
- ==778== Address 0x1ffea37f71 is on thread 1's stack
- ==778== in frame #4, created by main (trab.c:391)
- ==778==
- ==778== Invalid write of size 8
- ==778== at 0x483F950: memmove (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x48E1273: _IO_getline_info (iogetline.c:96)
- ==778== by 0x48E01AA: fgets (iofgets.c:53)
- ==778== by 0x1093B9: readSentences (trab.c:116)
- ==778== by 0x109CC5: main (trab.c:399)
- ==778== Address 0x1ffea37f78 is on thread 1's stack
- ==778== in frame #4, created by main (trab.c:391)
- ==778==
- ==778== Invalid write of size 1
- ==778== at 0x48E0222: fgets (iofgets.c:60)
- ==778== by 0x1093B9: readSentences (trab.c:116)
- ==778== by 0x109CC5: main (trab.c:399)
- ==778== Address 0x1ffea37f90 is on thread 1's stack
- ==778== in frame #2, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 1
- ==778== at 0x1093CD: readSentences (trab.c:119)
- ==778== by 0x109CC5: main (trab.c:399)
- ==778== Address 0x1ffea37f70 is on thread 1's stack
- ==778== in frame #1, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 1
- ==778== at 0x483BC32: strlen (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x10933F: removeLastChar (trab.c:101)
- ==778== by 0x1093F9: readSentences (trab.c:125)
- ==778== by 0x109CC5: main (trab.c:399)
- ==778== Address 0x1ffea37f70 is on thread 1's stack
- ==778== in frame #3, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 1
- ==778== at 0x483BC44: strlen (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x10933F: removeLastChar (trab.c:101)
- ==778== by 0x1093F9: readSentences (trab.c:125)
- ==778== by 0x109CC5: main (trab.c:399)
- ==778== Address 0x1ffea37f71 is on thread 1's stack
- ==778== in frame #3, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 1
- ==778== at 0x109359: removeLastChar (trab.c:102)
- ==778== by 0x1093F9: readSentences (trab.c:125)
- ==778== by 0x109CC5: main (trab.c:399)
- ==778== Address 0x1ffea37f8f is on thread 1's stack
- ==778== in frame #2, created by main (trab.c:391)
- ==778==
- ==778== Invalid write of size 1
- ==778== at 0x109371: removeLastChar (trab.c:103)
- ==778== by 0x1093F9: readSentences (trab.c:125)
- ==778== by 0x109CC5: main (trab.c:399)
- ==778== Address 0x1ffea37f8f is on thread 1's stack
- ==778== in frame #2, created by main (trab.c:391)
- ==778==
- ==778== Invalid write of size 4
- ==778== at 0x109CC6: main (trab.c:401)
- ==778== Address 0x1ffea37f68 is on thread 1's stack
- ==778== in frame #0, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 4
- ==778== at 0x109D0B: main (trab.c:401)
- ==778== Address 0x1ffea37f64 is on thread 1's stack
- ==778== in frame #0, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 4
- ==778== at 0x109D11: main (trab.c:401)
- ==778== Address 0x1ffea37f68 is on thread 1's stack
- ==778== in frame #0, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 4
- ==778== at 0x109CD9: main (trab.c:402)
- ==778== Address 0x1ffea37f68 is on thread 1's stack
- ==778== in frame #0, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 4
- ==778== at 0x109CEC: main (trab.c:402)
- ==778== Address 0x1ffea37f6c is on thread 1's stack
- ==778== in frame #0, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 8
- ==778== at 0x10963F: findProductIndex (trab.c:187)
- ==778== by 0x109A7F: processQuestion (trab.c:345)
- ==778== by 0x109D03: main (trab.c:402)
- ==778== Address 0x1ffea469d0 is on thread 1's stack
- ==778== in frame #2, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 1
- ==778== at 0x4840A3E: strstr (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x109650: findProductIndex (trab.c:187)
- ==778== by 0x109A7F: processQuestion (trab.c:345)
- ==778== by 0x109D03: main (trab.c:402)
- ==778== Address 0x1ffea37f70 is on thread 1's stack
- ==778== in frame #3, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 1
- ==778== at 0x4840A54: strstr (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x109650: findProductIndex (trab.c:187)
- ==778== by 0x109A7F: processQuestion (trab.c:345)
- ==778== by 0x109D03: main (trab.c:402)
- ==778== Address 0x1ffea37f71 is on thread 1's stack
- ==778== in frame #3, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 1
- ==778== at 0x4840A70: strstr (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x109650: findProductIndex (trab.c:187)
- ==778== by 0x109A7F: processQuestion (trab.c:345)
- ==778== by 0x109D03: main (trab.c:402)
- ==778== Address 0x1ffea37f80 is on thread 1's stack
- ==778== in frame #3, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 8
- ==778== at 0x483F8F4: memmove (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x109AC5: processQuestion (trab.c:349)
- ==778== by 0x109D03: main (trab.c:402)
- ==778== Address 0x1ffea63eb0 is on thread 1's stack
- ==778== in frame #2, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 8
- ==778== at 0x483F8FF: memmove (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x109AC5: processQuestion (trab.c:349)
- ==778== by 0x109D03: main (trab.c:402)
- ==778== Address 0x1ffea63eb8 is on thread 1's stack
- ==778== in frame #2, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 8
- ==778== at 0x483F907: memmove (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x109AC5: processQuestion (trab.c:349)
- ==778== by 0x109D03: main (trab.c:402)
- ==778== Address 0x1ffea63ec0 is on thread 1's stack
- ==778== in frame #2, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 8
- ==778== at 0x483F90F: memmove (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x109AC5: processQuestion (trab.c:349)
- ==778== by 0x109D03: main (trab.c:402)
- ==778== Address 0x1ffea63ec8 is on thread 1's stack
- ==778== in frame #2, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 8
- ==778== at 0x483F94D: memmove (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x109AC5: processQuestion (trab.c:349)
- ==778== by 0x109D03: main (trab.c:402)
- ==778== Address 0x1ffea72910 is on thread 1's stack
- ==778== in frame #2, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 1
- ==778== at 0x4840A3E: strstr (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x10968C: getQuestionIntent (trab.c:202)
- ==778== by 0x109AD4: processQuestion (trab.c:350)
- ==778== by 0x109D03: main (trab.c:402)
- ==778== Address 0x1ffea37f70 is on thread 1's stack
- ==778== in frame #3, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 1
- ==778== at 0x4840A70: strstr (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x10968C: getQuestionIntent (trab.c:202)
- ==778== by 0x109AD4: processQuestion (trab.c:350)
- ==778== by 0x109D03: main (trab.c:402)
- ==778== Address 0x1ffea37f71 is on thread 1's stack
- ==778== in frame #3, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 1
- ==778== at 0x483BC32: strlen (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x10920C: my_strdup (trab.c:41)
- ==778== by 0x109B6B: processQuestion (trab.c:364)
- ==778== by 0x109D03: main (trab.c:402)
- ==778== Address 0x1ffea37f70 is on thread 1's stack
- ==778== in frame #3, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 1
- ==778== at 0x483BC44: strlen (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x10920C: my_strdup (trab.c:41)
- ==778== by 0x109B6B: processQuestion (trab.c:364)
- ==778== by 0x109D03: main (trab.c:402)
- ==778== Address 0x1ffea37f71 is on thread 1's stack
- ==778== in frame #3, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 8
- ==778== at 0x483F8F4: memmove (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x109249: my_strdup (trab.c:47)
- ==778== by 0x109B6B: processQuestion (trab.c:364)
- ==778== by 0x109D03: main (trab.c:402)
- ==778== Address 0x1ffea37f70 is on thread 1's stack
- ==778== in frame #3, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 8
- ==778== at 0x483F8FF: memmove (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x109249: my_strdup (trab.c:47)
- ==778== by 0x109B6B: processQuestion (trab.c:364)
- ==778== by 0x109D03: main (trab.c:402)
- ==778== Address 0x1ffea37f78 is on thread 1's stack
- ==778== in frame #3, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 8
- ==778== at 0x483F907: memmove (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x109249: my_strdup (trab.c:47)
- ==778== by 0x109B6B: processQuestion (trab.c:364)
- ==778== by 0x109D03: main (trab.c:402)
- ==778== Address 0x1ffea37f80 is on thread 1's stack
- ==778== in frame #3, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 8
- ==778== at 0x483F90F: memmove (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x109249: my_strdup (trab.c:47)
- ==778== by 0x109B6B: processQuestion (trab.c:364)
- ==778== by 0x109D03: main (trab.c:402)
- ==778== Address 0x1ffea37f88 is on thread 1's stack
- ==778== in frame #3, created by main (trab.c:391)
- ==778==
- ==778== Invalid read of size 4
- ==778== at 0x109D04: main (trab.c:401)
- ==778== Address 0x1ffea37f68 is on thread 1's stack
- ==778== in frame #0, created by main (trab.c:391)
- ==778==
- ==778== Warning: client switching stacks? SP change: 0x1ffea37f60 --> 0x1ffefffda0
- ==778== to suppress, use: --max-stackframe=6061632 or greater
- ==778==
- ==778== HEAP SUMMARY:
- ==778== in use at exit: 293 bytes in 5 blocks
- ==778== total heap usage: 7 allocs, 2 frees, 2,341 bytes allocated
- ==778==
- ==778== 32 bytes in 1 blocks are definitely lost in loss record 1 of 3
- ==778== at 0x483874F: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x109220: my_strdup (trab.c:42)
- ==778== by 0x109B6B: processQuestion (trab.c:364)
- ==778== by 0x109D03: main (trab.c:402)
- ==778==
- ==778== 58 bytes in 1 blocks are definitely lost in loss record 2 of 3
- ==778== at 0x483874F: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x109220: my_strdup (trab.c:42)
- ==778== by 0x1096F0: countWordUsage (trab.c:221)
- ==778== by 0x109BEA: processQuestion (trab.c:371)
- ==778== by 0x109D03: main (trab.c:402)
- ==778==
- ==778== 203 bytes in 3 blocks are definitely lost in loss record 3 of 3
- ==778== at 0x483874F: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==778== by 0x109220: my_strdup (trab.c:42)
- ==778== by 0x109480: readSentencesWithProducts (trab.c:144)
- ==778== by 0x109CA8: main (trab.c:396)
- ==778==
- ==778== LEAK SUMMARY:
- ==778== definitely lost: 293 bytes in 5 blocks
- ==778== indirectly lost: 0 bytes in 0 blocks
- ==778== possibly lost: 0 bytes in 0 blocks
- ==778== still reachable: 0 bytes in 0 blocks
- ==778== suppressed: 0 bytes in 0 blocks
- ==778==
- ==778== For counts of detected and suppressed errors, rerun with: -v
- ==778== ERROR SUMMARY: 7891 errors from 50 contexts (suppressed: 0 from 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement