isl-org / isl-org/Open3D

The MSVC team recently test Open3D project failed to run test on release and debug configuration on windows_x64.

Open
#5,212 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).

### My Question

Hi All,

Open3D failed to run test on release and debug configuration with MSVC on windows x64. Could you please help look at this issue or provide some workarounds? Thanks in advance.

**Error message**
[test.log.2.txt](https://github.com/isl-org/Open3D/files/8925590/test.log.2.txt)
==15844==ERROR: AddressSanitizer: container-overflow on address 0x1273dca20ee3 at pc 0x7ff9c82d6d7c bp 0x00b5b130c3f0 sp 0x00b5b130bb70
WRITE of size 22 at 0x1273dca20ee3 thread T0
#0 0x7ff9c82d6da9 (C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\clang_rt.asan_dbg_dynamic-x86_64.dll+0x180046da9)
#1 0x7ff9a7ff8627 in std::_Char_traits::move(char *const, char const *const, unsigned __int64) C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xstring:117
#2 0x7ff9ac86e1d3 in std::basic_string, class std::allocator>::replace(unsigned __int64, unsigned __int64, char const *const, unsigned __int64) C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xstring:3791
#3 0x7ff9ad77e982 in std::basic_string, class std::allocator>::replace(unsigned __int64, unsigned __int64, class std::basic_string, class std::allocator> const &) C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xstring:3719
#4 0x7ff9ad6b28d8 in el::base::utils::Str::replaceFirstWithEscape(class std::basic_string, class std::allocator> &, class std::basic_string, class std::allocator> const &, class std::basic_string, class std::allocator> const &) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:953
#5 0x7ff9ad6ba582 in el::base::LogFormat::updateFormatSpec(void) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:1626
#6 0x7ff9ad6b802d in el::base::LogFormat::parseFromFormat(class std::basic_string, class std::allocator> const &) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:1553
#7 0x7ff9ad6b7043 in el::base::LogFormat::LogFormat(enum el::Level, class std::basic_string, class std::allocator> const &) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:1464
#8 0x7ff9ad6c2b36 in el::base::TypedConfigurations::build(class el::Configurations *) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:1714
#9 0x7ff9ad6c1569 in el::base::TypedConfigurations::TypedConfigurations(class el::Configurations *, class std::unordered_map, class std::allocator>, class std::shared_ptr>>, struct std::hash, class std::allocator>>, struct std::equal_to, class std::allocator>>, class std::allocator, class std::allocator> const, class std::shared_ptr>>>>> *) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:1638
#10 0x7ff9ad6c8790 in el::Logger::performConfig(class el::Configurations const &) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:678
#11 0x7ff9ad6c798c in el::Logger::configure(class el::Configurations const &) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:660
#12 0x7ff9ad6c718a in el::Logger::Logger(class std::basic_string, class std::allocator> const &, class el::Configurations const &, class std::unordered_map, class std::allocator>, class std::shared_ptr>>, struct std::hash, class std::allocator>>, struct std::equal_to, class std::allocator>>, class std::allocator, class std::allocator> const, class std::shared_ptr>>>>> *) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:623
#13 0x7ff9ad6c9634 in el::base::RegisteredLoggers::get(class std::basic_string, class std::allocator> const &, bool) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:1916
#14 0x7ff9ad6cbec6 in el::base::Storage::Storage(class std::shared_ptr const &) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:2094
#15 0x7ff9a7db2359 in el::base::`dynamic initializer for 'elStorage'' F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\src\log.cpp:9
#16 0x7ff9cf7722a2 (C:\Windows\SYSTEM32\ucrtbased.dll+0x1800b22a2)
#17 0x7ff9afbc3e14 in dllmain_crt_process_attach D:\a01\_work\2\s\src\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp:64
#18 0x7ff9afbc3d26 in dllmain_crt_dispatch D:\a01\_work\2\s\src\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp:219
#19 0x7ff9afbc3fc4 in dllmain_dispatch D:\a01\_work\2\s\src\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp:276
#20 0x7ff9afbc4150 in _DllMainCRTStartup D:\a01\_work\2\s\src\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp:334
#21 0x7ff9eb0f5d36 (C:\Windows\SYSTEM32\ntdll.dll+0x180025d36)
#22 0x7ff9eb0f85e8 (C:\Windows\SYSTEM32\ntdll.dll+0x1800285e8)
#23 0x7ff9eb0f8853 (C:\Windows\SYSTEM32\ntdll.dll+0x180028853)
#24 0x7ff9eb0f887d (C:\Windows\SYSTEM32\ntdll.dll+0x18002887d)
#25 0x7ff9eb1a5b19 (C:\Windows\SYSTEM32\ntdll.dll+0x1800d5b19)
#26 0x7ff9eb14839a (C:\Windows\SYSTEM32\ntdll.dll+0x18007839a)
#27 0x7ff9eb148222 (C:\Windows\SYSTEM32\ntdll.dll+0x180078222)
#28 0x7ff9eb1481cd (C:\Windows\SYSTEM32\ntdll.dll+0x1800781cd)

0x1273dca20ee3 is located 67 bytes inside of 95-byte region [0x1273dca20ea0,0x1273dca20eff)
allocated by thread T0 here:
#0 0x7ff9afbbc5ba in operator new(unsigned __int64) D:\a01\_work\2\s\src\vctools\asan\llvm\compiler-rt\lib\asan\asan_win_new_scalar_thunk.cpp:41
#1 0x7ff9a7ffa932 in std::_Default_allocate_traits::_Allocate(unsigned __int64) C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xmemory:79
#2 0x7ff9a7ffa971 in std::_Allocate<16, struct std::_Default_allocate_traits, 0>(unsigned __int64) C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xmemory:237
#3 0x7ff9a7ff914f in std::allocator::allocate(unsigned __int64) C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xmemory:837
#4 0x7ff9ac84f4df in std::basic_string, class std::allocator>::_Reallocate_grow_by, unsigned __int64, unsigned __int64, char const *, unsigned __int64>(unsigned __int64, class , unsigned __int64, unsigned __int64, char const *, unsigned __int64) C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xstring:4815
#5 0x7ff9ac86e322 in std::basic_string, class std::allocator>::replace(unsigned __int64, unsigned __int64, char const *const, unsigned __int64) C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xstring:3804
#6 0x7ff9ad77e982 in std::basic_string, class std::allocator>::replace(unsigned __int64, unsigned __int64, class std::basic_string, class std::allocator> const &) C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xstring:3719
#7 0x7ff9ad6b28d8 in el::base::utils::Str::replaceFirstWithEscape(class std::basic_string, class std::allocator> &, class std::basic_string, class std::allocator> const &, class std::basic_string, class std::allocator> const &) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:953
#8 0x7ff9ad6ba4b8 in el::base::LogFormat::updateFormatSpec(void) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:1622
#9 0x7ff9ad6b802d in el::base::LogFormat::parseFromFormat(class std::basic_string, class std::allocator> const &) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:1553
#10 0x7ff9ad6b7043 in el::base::LogFormat::LogFormat(enum el::Level, class std::basic_string, class std::allocator> const &) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:1464
#11 0x7ff9ad6c2b36 in el::base::TypedConfigurations::build(class el::Configurations *) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:1714
#12 0x7ff9ad6c1569 in el::base::TypedConfigurations::TypedConfigurations(class el::Configurations *, class std::unordered_map, class std::allocator>, class std::shared_ptr>>, struct std::hash, class std::allocator>>, struct std::equal_to, class std::allocator>>, class std::allocator, class std::allocator> const, class std::shared_ptr>>>>> *) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:1638
#13 0x7ff9ad6c8790 in el::Logger::performConfig(class el::Configurations const &) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:678
#14 0x7ff9ad6c798c in el::Logger::configure(class el::Configurations const &) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:660
#15 0x7ff9ad6c718a in el::Logger::Logger(class std::basic_string, class std::allocator> const &, class el::Configurations const &, class std::unordered_map, class std::allocator>, class std::shared_ptr>>, struct std::hash, class std::allocator>>, struct std::equal_to, class std::allocator>>, class std::allocator, class std::allocator> const, class std::shared_ptr>>>>> *) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:623
#16 0x7ff9ad6c9634 in el::base::RegisteredLoggers::get(class std::basic_string, class std::allocator> const &, bool) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:1916
#17 0x7ff9ad6cbec6 in el::base::Storage::Storage(class std::shared_ptr const &) F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\third-party\easyloggingpp\src\easylogging++.cc:2094
#18 0x7ff9a7db2359 in el::base::`dynamic initializer for 'elStorage'' F:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\src\log.cpp:9
#19 0x7ff9cf7722a2 (C:\Windows\SYSTEM32\ucrtbased.dll+0x1800b22a2)
#20 0x7ff9afbc3e14 in dllmain_crt_process_attach D:\a01\_work\2\s\src\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp:64
#21 0x7ff9afbc3d26 in dllmain_crt_dispatch D:\a01\_work\2\s\src\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp:219
#22 0x7ff9afbc3fc4 in dllmain_dispatch D:\a01\_work\2\s\src\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp:276
#23 0x7ff9afbc4150 in _DllMainCRTStartup D:\a01\_work\2\s\src\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp:334
#24 0x7ff9eb0f5d36 (C:\Windows\SYSTEM32\ntdll.dll+0x180025d36)
#25 0x7ff9eb0f85e8 (C:\Windows\SYSTEM32\ntdll.dll+0x1800285e8)
#26 0x7ff9eb0f8853 (C:\Windows\SYSTEM32\ntdll.dll+0x180028853)
#27 0x7ff9eb0f887d (C:\Windows\SYSTEM32\ntdll.dll+0x18002887d)
#28 0x7ff9eb1a5b19 (C:\Windows\SYSTEM32\ntdll.dll+0x1800d5b19)
#29 0x7ff9eb14839a (C:\Windows\SYSTEM32\ntdll.dll+0x18007839a)

HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_container_overflow=0.
If you suspect a false positive see also: https://github.com/google/sanitizers/wiki/AddressSanitizerContainerOverflow.
SUMMARY: AddressSanitizer: container-overflow (C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\clang_rt.asan_dbg_dynamic-x86_64.dll+0x180046da9)
Shadow bytes around the buggy address:
0x04b258344180: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 00
0x04b258344190: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 00
0x04b2583441a0: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 00
0x04b2583441b0: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 00
0x04b2583441c0: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 00
=>0x04b2583441d0: fa fa fa fa 00 00 00 00 00 00 00 00[03]fc fc fc
0x04b2583441e0: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fd fa
0x04b2583441f0: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fd fa
0x04b258344200: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fd fa
0x04b258344210: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fd fd
0x04b258344220: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fd 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
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==15844==ABORTING

**Steps to reproduce the issue**
1.git clone https://github.com/isl-org/Open3D.git F:\gitP\isl-org\Open3D
2.set VSCMD_SKIP_SENDTELEMETRY=1 & "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64 & set _CL_= /fsanitize=address /GS- /wd5072 & set _LINK_= /InferASanLibs /incremental:no /debug
3.mkdir&cd F:\gitP\isl-org\Open3D\build_amd64
4.cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=ON -DSTATIC_WINDOWS_RUNTIME=OFF -DBUILD_COMMON_ISPC_ISAS=ON -DBUILD_LIBREALSENSE=ON -DBUILD_WEBRTC=OFF -DBUILD_UNIT_TESTS=ON -DBUILD_CUDA_MODULE=OFF .. 2>&1
5.pip3 install wheel 2>&1
6.msbuild /m /p:Platform=x64 /p:Configuration=Release Open3D.sln /t:Rebuild 2>&1
7.cd F:\gitP\isl-org\Open3D\build_amd64\bin\Release
8.tests.exe 2>&1

**Expected behavior**
test pass

**Open3D, Python and System information**
- Operating system: Windows 10 64-bit
- Python version: Python 3.9
- Open3D version: 0.15.1

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.