The MSVC team recently test OpenPose project failed to run test on windows_x64.
Hi All,
OpenPose failed to run test'OpenPoseDemo.exe' on release configuration with MSVC on windows x64. Could you please help look at this issue or provide some workarounds? Thanks in advance.
Errors (if any)
==10396==ERROR: AddressSanitizer: container-overflow on address 0x7ff6a23a3741 at pc 0x7ff9c1be68fc bp 0x009e0caff4c0 sp 0x009e0cafec40 WRITE of size 15 at 0x7ff6a23a3741 thread T0 #0 0x7ff9c1be6929 (C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\clang_rt.asan_dynamic-x86_64.dll+0x180046929) #1 0x7ff9d0f4dd14 in google::VersionString(void) (F:\gitP\CMU-Perceptual-Computing-Lab\openpose\artifacts\bin\gflags.dll+0x18000dd14) #2 0x7ff9d0f4c3ec in google::StringFromEnv(char const *, char const *) (F:\gitP\CMU-Perceptual-Computing-Lab\openpose\artifacts\bin\gflags.dll+0x18000c3ec) #3 0x7ff9d0f4baca in google::SetCommandLineOptionWithMode(char const *, char const *, enum google::FlagSettingMode) (F:\gitP\CMU-Perceptual-Computing-Lab\openpose\artifacts\bin\gflags.dll+0x18000baca) #4 0x7ff9d0f49d53 in google::ParseCommandLineNonHelpFlags(int *, char ***, bool) (F:\gitP\CMU-Perceptual-Computing-Lab\openpose\artifacts\bin\gflags.dll+0x180009d53) #5 0x7ff9d0f48974 in google::ParseCommandLineNonHelpFlags(int *, char ***, bool) (F:\gitP\CMU-Perceptual-Computing-Lab\openpose\artifacts\bin\gflags.dll+0x180008974) #6 0x7ff9d0f47f98 in google::ParseCommandLineFlags(int *, char ***, bool) (F:\gitP\CMU-Perceptual-Computing-Lab\openpose\artifacts\bin\gflags.dll+0x180007f98) #7 0x7ff6a236cc9f in main F:\gitP\CMU-Perceptual-Computing-Lab\openpose\examples\openpose\openpose.cpp:156 #8 0x7ff6a236d7bf in __scrt_common_main_seh D:\a01_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288 #9 0x7ff9e87e7973 (C:\Windows\System32\KERNEL32.DLL+0x180017973) #10 0x7ff9eb12a2f0 (C:\Windows\SYSTEM32\ntdll.dll+0x18005a2f0)
0x7ff6a23a3741 is located 1 bytes inside of global variable 'fLS::s_image_dir' defined in 'flags.hpp:38' (0x7ff6a23a3740) of size 64 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_dynamic-x86_64.dll+0x180046929) Shadow bytes around the buggy address: 0x123cdcef4690: f9 f9 f9 f9 f9 f9 f9 f9 01 fc 00 00 01 fc 00 00 0x123cdcef46a0: f9 f9 f9 f9 f9 f9 f9 f9 01 fc 00 00 01 fc 00 00 0x123cdcef46b0: f9 f9 f9 f9 f9 f9 f9 f9 05 fc 00 00 05 fc 00 00 0x123cdcef46c0: f9 f9 f9 f9 f9 f9 f9 f9 06 fc 00 00 06 fc 00 00 0x123cdcef46d0: f9 f9 f9 f9 f9 f9 f9 f9 01 fc 00 00 01 fc 00 00 =>0x123cdcef46e0: f9 f9 f9 f9 f9 f9 f9 f9[01]fc 00 00 01 fc 00 00 0x123cdcef46f0: f9 f9 f9 f9 f9 f9 f9 f9 01 fc 00 00 01 fc 00 00 0x123cdcef4700: f9 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00 0x123cdcef4710: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x123cdcef4720: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x123cdcef4730: 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 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 ==10396==ABORTING
Steps to reproduce the issue
- git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose.git F:\gitP\CMU-Perceptual-Computing-Lab\openpose
- 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
- mkdir&cd F:\gitP\CMU-Perceptual-Computing-Lab\openpose\build_amd64
- cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DCMAKE_BUILD_TYPE=Debug -DGPU_MODE=CPU_ONLY .. 2>&1
- msbuild /m /p:Platform=x64 /p:Configuration=Release OpenPose.sln /t:Rebuild 2>&1
- cd F:\gitP\CMU-Perceptual-Computing-Lab\openpose
- mkdir artifacts mkdir artifacts\bin mkdir artifacts\examples mkdir artifacts\examples\media mkdir artifacts\include mkdir artifacts\lib
- xcopy F:\gitP\CMU-Perceptual-Computing-Lab\openpose\build_amd64\x64\Release*.exe F:\gitP\CMU-Perceptual-Computing-Lab\openpose\artifacts\bin /k/r/e/i/s/c/h/f/y
- xcopy F:\gitP\CMU-Perceptual-Computing-Lab\openpose\build_amd64\x64\Release*.dll F:\gitP\CMU-Perceptual-Computing-Lab\openpose\artifacts\bin /k/r/e/i/s/c/h/f/y
- xcopy F:\gitP\CMU-Perceptual-Computing-Lab\openpose\build_amd64\bin*.dll F:\gitP\CMU-Perceptual-Computing-Lab\openpose\artifacts\bin /k/r/e/i/s/c/h/f/y
- xcopy examples\media* F:\gitP\CMU-Perceptual-Computing-Lab\openpose\artifacts\examples\media /k/r/e/i/s/c/h/f/y
- xcopy include\openpose F:\gitP\CMU-Perceptual-Computing-Lab\openpose\artifacts\include /k/r/e/i/s/c/h/f/y
- xcopy 3rdparty\windows\opencv\include\opencv2 F:\gitP\CMU-Perceptual-Computing-Lab\openpose\artifacts\include /k/r/e/i/s/c/h/f/y
- xcopy F:\gitP\CMU-Perceptual-Computing-Lab\openpose\build_amd64*.lib F:\gitP\CMU-Perceptual-Computing-Lab\openpose\artifacts\lib /k/r/e/i/s/c/h/f/y
- xcopy 3rdparty*.lib F:\gitP\CMU-Perceptual-Computing-Lab\openpose\artifacts\lib /k/r/e/i/s/c/h/f/y
- xcopy models F:\gitP\CMU-Perceptual-Computing-Lab\openpose\artifacts /k/r/e/i/s/c/h/f/y
- .\artifacts\bin\OpenPoseDemo.exe --image_dir examples/media/ --net_resolution -1x32 --write_json output/ --write_images output/ --display 0 2>&1
Expected behavior test pass
Type of Issue
- Execution error
- Help wanted
Your System Configuration
-
Whole console output (if errors appeared), paste the error to PasteBin and then paste the link here: LINK
-
OpenPose version: 95f2ce0
-
General configuration:
- Installation mode: CMake
- Operating system Window 10
- Operating system version Windows 10
- Release or Debug mode? Release
- Compiler: Visual Studio 2019
-
Non-default settings:
- 3-D Reconstruction module added? : no
- Any other custom CMake configuration with respect to the default version? : no
-
3rd-party software:
- Caffe version: Default from OpenPose
- CMake version : 3.22.0
- OpenCV version: OpenPose default
-
If Python API:
- Python version: 3.9