-
-
Notifications
You must be signed in to change notification settings - Fork 238
Closed
Description
- axmol version: 4e664e6
- devices test on: Windows 10
- developing environments
- NDK version: r19c
- Xcode version: 12.4
- Visual Studio:
- VS version: 2022 (17.6.3)
- MSVC version: 1929, 1934
- Windows SDK version: 10.0.22621.0
- cmake version: 3.25.2
Steps to Reproduce:
Windows, Visual studio 2022
- Enable adress sanitizer for VS
https://learn.microsoft.com/en-us/cpp/sanitizers/asan?view=msvc-170
by adding on the top of to CMakeLists.txt
add_compile_options(/fsanitize=address)
- build and start cpp-test
- Press "Start AutoTest"
- After some time application crashed with
Sample errors:
- ActionsProgressTests
Address Sanitizer Error: Use of out-of-scope stack memory
void ProgressTimer::updateColor()
{
if (!_sprite)
return;
if (!_vertexData.empty())
{
const Color4B& sc = _sprite->getQuad().tl.colors;
for (int i = 0; i < _vertexData.size(); ++i)
{
_vertexData[i].colors = sc;
}
}
}
- TextureCacheUnbindTest
Address Sanitizer Error: Use of deallocated memory
// release the asyncStruct
delete asyncStruct;
--_asyncRefCount;
Comments:
This kind of problems means that we are in undefined behavior zone and can not reason about program correctness.
This kind of issue could result in the problems seen in #1211