================================================================= ==10481==ERROR: AddressSanitizer: heap-use-after-free on address 0x603000014998 at pc 0x7f7f52711590 bp 0x7ffedc5d4690 sp 0x7ffedc5d4660 READ of size 2 at 0x603000014998 thread T0 #0 0x7f7f5271158f in __interceptor_strchr (/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libasan.so.1+0x3458f) #1 0x564b27c3891b in strchr /usr/include/string.h:226 #2 0x564b27c3891b in cmsys::RegularExpression::find(char const*) /var/tmp/portage/dev-util/cmake-3.4.3/work/cmake-3.4.3/Source/kwsys/RegularExpression.cxx:928 #3 0x564b278c9f7e in cmConditionEvaluator::HandleLevel2(std::list >&, std::string&, cmake::MessageType&) /var/tmp/portage/dev-util/cmake-3.4.3/work/cmake-3.4.3/Source/cmConditionEvaluator.cxx:608 #4 0x564b278decd8 in cmConditionEvaluator::IsTrue(std::vector > const&, std::string&, cmake::MessageType&) /var/tmp/portage/dev-util/cmake-3.4.3/work/cmake-3.4.3/Source/cmConditionEvaluator.cxx:78 #5 0x564b278df3a0 in cmIfCommand::InvokeInitialPass(std::vector > const&, cmExecutionStatus&) /var/tmp/portage/dev-util/cmake-3.4.3/work/cmake-3.4.3/Source/cmIfCommand.cxx:217 #6 0x564b276bb068 in cmMakefile::ExecuteCommand(cmListFileFunction const&, cmExecutionStatus&) /var/tmp/portage/dev-util/cmake-3.4.3/work/cmake-3.4.3/Source/cmMakefile.cxx:305 #7 0x564b276bb7d2 in cmMakefile::ReadListFile(cmListFile const&, std::string const&) /var/tmp/portage/dev-util/cmake-3.4.3/work/cmake-3.4.3/Source/cmMakefile.cxx:611 #8 0x564b276bd3a6 in cmMakefile::Configure() /var/tmp/portage/dev-util/cmake-3.4.3/work/cmake-3.4.3/Source/cmMakefile.cxx:1663 #9 0x564b27aa5ec3 in cmGlobalGenerator::Configure() /var/tmp/portage/dev-util/cmake-3.4.3/work/cmake-3.4.3/Source/cmGlobalGenerator.cxx:1126 #10 0x564b27ac9241 in cmGlobalUnixMakefileGenerator3::Configure() /var/tmp/portage/dev-util/cmake-3.4.3/work/cmake-3.4.3/Source/cmGlobalUnixMakefileGenerator3.cxx:133 #11 0x564b2779ed6b in cmake::ActualConfigure() /var/tmp/portage/dev-util/cmake-3.4.3/work/cmake-3.4.3/Source/cmake.cxx:1422 #12 0x564b277a0248 in cmake::Configure() /var/tmp/portage/dev-util/cmake-3.4.3/work/cmake-3.4.3/Source/cmake.cxx:1205 #13 0x564b277a51f7 in cmake::Run(std::vector > const&, bool) /var/tmp/portage/dev-util/cmake-3.4.3/work/cmake-3.4.3/Source/cmake.cxx:1579 #14 0x564b2763f2f9 in do_cmake(int, char const* const*) /var/tmp/portage/dev-util/cmake-3.4.3/work/cmake-3.4.3/Source/cmakemain.cxx:330 #15 0x564b2763751a in main /var/tmp/portage/dev-util/cmake-3.4.3/work/cmake-3.4.3/Source/cmakemain.cxx:190 #16 0x7f7f511b062f in __libc_start_main (/lib64/libc.so.6+0x2062f) #17 0x564b2763ce78 in _start (/usr/bin/cmake+0x163e78) 0x603000014998 is located 24 bytes inside of 26-byte region [0x603000014980,0x60300001499a) freed by thread T0 here: #0 0x7f7f5273561f in operator delete(void*) (/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libasan.so.1+0x5861f) #1 0x7f7f51b08c37 in std::string::assign(std::string const&) (/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/libstdc++.so.6+0xcec37) #2 0x61c00000f87f (+0xf87f) #3 0x7f7f51b09485 in std::basic_string, std::allocator >::basic_string(char const*, std::allocator const&) (/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/libstdc++.so.6+0xcf485) previously allocated by thread T0 here: #0 0x7f7f5273511f in operator new(unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libasan.so.1+0x5811f) #1 0x7f7f51b076c8 in std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/libstdc++.so.6+0xcd6c8) #2 0x7f7f51b076c8 in std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/libstdc++.so.6+0xcd6c8) #3 0x564b28040147 in matchVariables (/usr/bin/cmake+0xb67147) SUMMARY: AddressSanitizer: heap-use-after-free ??:0 __interceptor_strchr Shadow bytes around the buggy address: 0x0c067fffa8e0: fa fa fd fd fd fd fa fa fd fd fd fd fa fa fd fd 0x0c067fffa8f0: fd fd fa fa fd fd fd fd fa fa fd fd fd fd fa fa 0x0c067fffa900: fd fd fd fd fa fa fd fd fd fd fa fa fd fd fd fd 0x0c067fffa910: fa fa fd fd fd fd fa fa fd fd fd fa fa fa fd fd 0x0c067fffa920: fd fd fa fa fd fd fd fd fa fa fd fd fd fd fa fa =>0x0c067fffa930: fd fd fd[fd]fa fa fd fd fd fd fa fa fd fd fd fd 0x0c067fffa940: fa fa fd fd fd fd fa fa fd fd fd fd fa fa fd fd 0x0c067fffa950: fd fd fa fa fd fd fd fd fa fa fd fd fd fd fa fa 0x0c067fffa960: fd fd fd fd fa fa fd fd fd fd fa fa fd fd fd fd 0x0c067fffa970: fa fa fd fd fd fd fa fa fd fd fd fd fa fa fd fd 0x0c067fffa980: fd fd fa fa fd fd fd fd fa fa fd fd fd fd fa fa 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 right 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 Contiguous container OOB:fc ASan internal: fe ==10481==ABORTING