LP #1553938: Valgrind error on hp_test2
Description
Environment
Smart Checklist
Activity
lpjirasync January 22, 2018 at 7:54 PM
**Comment from Launchpad by: Laurynas Biveinis on: 23-08-2016 12:55:58
https://github.com/percona/percona-server/pull/880
https://github.com/percona/percona-server/pull/881
https://github.com/percona/percona-server/pull/882
lpjirasync January 22, 2018 at 7:54 PM
**Comment from Launchpad by: Laurynas Biveinis on: 23-08-2016 09:47:53
Also
==16282==
==16282== HEAP SUMMARY:
==16282== in use at exit: 1,736 bytes in 2 blocks
==16282== total heap usage: 42 allocs, 40 frees, 1,691,210 bytes allocated
==16282==
==16282== 8 bytes in 1 blocks are possibly lost in loss record 1 of 2
==16282== at 0x4C2DB8F: malloc (vg_replace_malloc.c:299)
==16282== by 0x415AE6: my_malloc (my_malloc.c:38)
==16282== by 0x41601E: my_strdup (my_malloc.c:158)
==16282== by 0x407639: heap_create (hp_create.c:344)
==16282== by 0x404234: main (hp_test2.c:587)
==16282==
==16282== 1,728 bytes in 1 blocks are possibly lost in loss record 2 of 2
==16282== at 0x4C2DB8F: malloc (vg_replace_malloc.c:299)
==16282== by 0x415AE6: my_malloc (my_malloc.c:38)
==16282== by 0x407173: heap_create (hp_create.c:246)
==16282== by 0x404234: main (hp_test2.c:587)
==16282==
==16282== LEAK SUMMARY:
==16282== definitely lost: 0 bytes in 0 blocks
==16282== indirectly lost: 0 bytes in 0 blocks
==16282== possibly lost: 1,736 bytes in 2 blocks
==16282== still reachable: 0 bytes in 0 blocks
==16282== suppressed: 0 bytes in 0 blocks
==16282==
Details
Details
Assignee
Reporter
Labels
Priority
Smart Checklist
Open Smart Checklist
Smart Checklist

**Reported in Launchpad by Laurynas Biveinis last update 19-09-2016 08:05:09
$ valgrind --track-origins=yes ./storage/heap/hp_test2
==1994== Memcheck, a memory error detector
==1994== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==1994== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==1994== Command: ./storage/heap/hp_test2
==1994==
Creating heap-file
Writing records:s
Delete
Update
Read first key - next - delete - next -> last
Read last key - delete - prev - prev - opt_delete - prev -> first
Read (first) - next - delete - next -> last
Test if: Read rrnd - same - rkey - same
==1994== Conditional jump or move depends on uninitialised value(s)
==1994== at 0x40AABA: hp_make_key (hp_hash.c:606)
==1994== by 0x4103E9: heap_rsame (hp_rsame.c:45)
==1994== by 0x403DFC: main (hp_test2.c:424)
==1994== Uninitialised value was created by a stack allocation
==1994== at 0x402751: main (hp_test2.c:43)
==1994==
Test of read through position
heap_info
Read through all records with scan
Read through all keys with first-next-last-prev
Reading through all rows through keys
Creating output heap-file 2
Copying and removing records
Checking heap tables
Key: 0 records: 0 seeks: 0 max links: 0 hitrate: 0.00 buckets: 0
Key: 1 records: 0 seeks: 0 max links: 0 hitrate: 0.00 buckets: 0
Key: 2 records: 0 seeks: 0 max links: 0 hitrate: 0.00 buckets: 0
Key: 3 records: 0 seeks: 0 max links: 0 hitrate: 0.00 buckets: 0
Key: 0 records: 7764 seeks: 44823 max links: 34 hitrate: 5.77 buckets: 908
Following test have been made:
Write records: 16395
Update records: 709
Delete records: 8631
User time 51.27, System time 0.12
Maximum resident set size 154300, Integral resident set size 0
Non-physical pagefaults 9540, Physical pagefaults 0, Swaps 0
Blocks in 0 out 24, Messages in 0 out 0, Signals 0
Voluntary context switches 0, Involuntary context switches 102
==1994==
==1994== HEAP SUMMARY:
==1994== in use at exit: 3,376 bytes in 4 blocks
==1994== total heap usage: 80 allocs, 76 frees, 4,001,556 bytes allocated
==1994==
==1994== LEAK SUMMARY:
==1994== definitely lost: 0 bytes in 0 blocks
==1994== indirectly lost: 0 bytes in 0 blocks
==1994== possibly lost: 1,656 bytes in 2 blocks
==1994== still reachable: 0 bytes in 0 blocks
==1994== suppressed: 0 bytes in 0 blocks
==1994== Rerun with --leak-check=full to see details of leaked memory
==1994==
==1994== For counts of detected and suppressed errors, rerun with: -v
==1994== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)