Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: fix invalid read reported by address sanitizer
================================================================= ==849267== ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff4caa7230 at pc 0x7ffdf8608687 bp 0x7fff4caa71b0 sp 0x7fff4caa71a0 READ of size 8 at 0x7fff4caa7230 thread T0 #0 0x7ffdf8608686 in fi_tostr_ libfabric-current/src/fi_tostr.c:618 #1 0x402f3a in run_test_set ofi/libfabric-current/fabtest/unit/size_left_test.c:262 ofiwg#2 0x403457 in main libfabric-current/fabtest/unit/size_left_test.c:317 ofiwg#3 0x7ffdf4819b14 in __libc_start_main (/usr/lib64/libc.so.6+0x21b14) ofiwg#4 0x401988 in _start (libfabric-1.4.0/ofi_inst/bin/fi_size_left_test+0x401988) Address 0x7fff4caa7230 is located at offset 32 in frame <run_test_set> of T0's stack: This frame has 2 object(s): [32, 36) 'ep_type' [96, 104) 'info' HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-buffer-overflow libfabric-current/src/fi_tostr.c:618 fi_tostr_ Shadow bytes around the buggy address: 0x10006994cdf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006994ce00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006994ce10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006994ce20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006994ce30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x10006994ce40: 00 00 f1 f1 f1 f1[04]f4 f4 f4 f2 f2 f2 f2 00 f4 0x10006994ce50: f4 f4 f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 0x10006994ce60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006994ce70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006994ce80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006994ce90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap righ redzone: fb Freed Heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 ASan internal: fe ==849267== ABORTING Change-Id: I90e59ca4127a792718cac5180da33ff2caf66f2b
- Loading branch information