Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix another instrumented filename in perfscema unittest
Summary: As title. Test Plan: I couldn't reproduce it on my local server, but it fails consistently on sandcastle. Sandcastle filename+dirname may be too long and cause flakiness, while the `-instrumented` postfix has some magic of avoiding/cleaning up leaks. Ran `[build dir]/storage/perfschema/unittest/pfs-t`. Before the fix: ================================================================= ==678962==ERROR: LeakSanitizer: detected memory leaks Direct leak of 40 byte(s) in 1 object(s) allocated from: #0 0x7fd33820a151 in __interceptor_calloc (/usr/local/fbcode/gcc-5-glibc-2.23/lib/libasan.so.2+0x9a151) facebook#1 0x447409 in my_malloc /data/sandcastle/boxes/trunk-git-mysql-int-tools-primary/mysql-src/mysys/my_malloc.c:38 facebook#2 0x44dae8 in _lf_alloc_new /data/sandcastle/boxes/trunk-git-mysql-int-tools-primary/mysql-src/mysys/lf_alloc-pin.c:440 facebook#3 0x4501b0 in lf_hash_insert /data/sandcastle/boxes/trunk-git-mysql-int-tools-primary/mysql-src/mysys/lf_hash.c:390 facebook#4 0x418400 in find_or_create_file(PFS_thread*, PFS_file_class*, char const*, unsigned int, bool) /data/sandcastle/boxes/trunk-git-mysql-int-tools-primary/mysql-src/storage/perfschema/pfs_instr.cc:1353 facebook#5 0x441926 in end_file_open_wait_and_bind_to_descriptor_v1 /data/sandcastle/boxes/trunk-git-mysql-int-tools-primary/mysql-src/storage/perfschema/pfs.cc:3996 facebook#6 0x40c160 in test_file_instrumentation_leak() /data/sandcastle/boxes/trunk-git-mysql-int-tools-primary/mysql-src/storage/perfschema/unittest/pfs-t.cc:1438 facebook#7 0x40d0dc in do_all_tests() /data/sandcastle/boxes/trunk-git-mysql-int-tools-primary/mysql-src/storage/perfschema/unittest/pfs-t.cc:1659 facebook#8 0x403d38 in main /data/sandcastle/boxes/trunk-git-mysql-int-tools-primary/mysql-src/storage/perfschema/unittest/pfs-t.cc:1667 facebook#9 0x7fd336c97857 in __libc_start_main (/usr/local/fbcode/gcc-5-glibc-2.23/lib/libc.so.6+0x20857) facebook#10 0x404bf8 in _start (/data/sandcastle/boxes/trunk-git-mysql-int-secondary/_build-5.6-ASan-PerfSchema/storage/perfschema/unittest/pfs-t+0x404bf8) SUMMARY: AddressSanitizer: 40 byte(s) leaked in 1 allocation(s). Clean run after the change. Reviewers: gunnarku Reviewed By: gunnarku Differential Revision: https://phabricator.intern.facebook.com/D5243042 Tasks: 17217920 Signature: t1:5243042:1497460215:c79e007405676c8ea585e1eb09c881fd3ed1ce1f
- Loading branch information