Immediate crash in ./openmw with -fsanitize=memory
- Is the problem OpenMW specific or does it also happen in vanilla Morrowind?
OpenMW specific.
- What is your operating system?
Debian Linux (unstable/sid / Linux debian 6.7.12-amd64 #1 (closed) SMP PREEMPT_DYNAMIC Debian 6.7.12-1 (2024-04-24) x86_64 GNU/Linux)
- What version of OpenMW are you using? If you used a bleeding edge build, state the exact revision used.
austin@debian:~/src/openmw/build$ git show | head
commit 2bed7450b6a8676d462f90320d0e73332f37c086
Merge: 811236bfe1 bf568da6de
Author: psi29a <psi29a@gmail.com>
Date: Tue May 14 07:43:55 2024 +0000
Merge branch 'style_change' into 'master'
Minor changes in Qt styles handling
See merge request OpenMW/openmw!4093
- What version of Morrowind are you using (i.e. retail CD or Steam)? What addons (Tribunal, Bloodmoon) do you have installed? What language is your Morrowind install?
- What are the exact steps to reproduce the problem?
cd $OPENMW-SRC
rm -rf build
cd build
cmake \
-D CMAKE_C_COMPILER=clang \
-D CMAKE_CXX_COMPILER=clang++ \
-D CMAKE_CXX_FLAGS="-stdlib=libstdc++" \
-D CMAKE_CXX_FLAGS_DEBUG="-g -O1 -fsanitize=memory" \
-D CMAKE_EXE_LINKER_FLAGS="-stdlib=libstdc++ -fsanitize=memory" ../
make -j$(nproc)
./openmw-launcher
- What did you expect to happen?
OpenMW launcher runs
- What happened instead?
austin@debian:~/src/openmw/build$ ./openmw-launcher
Uninitialized bytes in MemcmpInterceptorCommon at offset 0 inside [0x702000000600, 16)
==210486==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x56099302cd61 in __interceptor_memcmp (/home/austin/src/openmw/build/openmw-launcher+0x7dd61) (BuildId: 0ef399177baed4ae9b1d2f6eeb37ee5ce1d325c3)
#1 0x7f3121b69677 in osg::DisplaySettings::setValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) (/lib/x86_64-linux-gnu/libosg.so.161+0x169677) (BuildId: b0b2bd1adc9d97443225d69fc750ef49d9ce90ee)
#2 0x7f3121b698e7 in osg::DisplaySettings::setShaderHint(osg::DisplaySettings::ShaderHint, bool) (/lib/x86_64-linux-gnu/libosg.so.161+0x1698e7) (BuildId: b0b2bd1adc9d97443225d69fc750ef49d9ce90ee)
#3 0x7f3121b6a8b1 in osg::DisplaySettings::setDefaults() (/lib/x86_64-linux-gnu/libosg.so.161+0x16a8b1) (BuildId: b0b2bd1adc9d97443225d69fc750ef49d9ce90ee)
#4 0x7f3121b6c402 in osg::DisplaySettings::instance() (/lib/x86_64-linux-gnu/libosg.so.161+0x16c402) (BuildId: b0b2bd1adc9d97443225d69fc750ef49d9ce90ee)
#5 0x7f3121b19ff4 (/lib/x86_64-linux-gnu/libosg.so.161+0x119ff4) (BuildId: b0b2bd1adc9d97443225d69fc750ef49d9ce90ee)
#6 0x7f31233e4e7d in call_init elf/dl-init.c:74:3
#7 0x7f31233e4e7d in call_init elf/dl-init.c:26:1
#8 0x7f31233e4f63 in _dl_init elf/dl-init.c:121:5
#9 0x7f31233fa83f (/lib64/ld-linux-x86-64.so.2+0x1a83f) (BuildId: ff5c568eedae694889a9e538626349bd134604c8)
SUMMARY: MemorySanitizer: use-of-uninitialized-value (/home/austin/src/openmw/build/openmw-launcher+0x7dd61) (BuildId: 0ef399177baed4ae9b1d2f6eeb37ee5ce1d325c3) in __interceptor_memcmp
Exiting
Edited by Austin English