Closed mdavidsaver closed 5 years ago
Do you understand why we only have a problem on windows-x64-static, and not windows-x64?
shared_ptr<> is not consistent about zero length arrays vs. empty array. So:
shared_ptr
X; shared_ptr Y(0);
behave differently.
Do you understand why we only have a problem on windows-x64-static, and not windows-x64?
It's probably a question of:
#ifdef _DEBUG
It's probably a question of:
#ifdef _DEBUG
This is correct. In CONFIG_SITE.Common.windows-x64-static I had the line: HOST_OPT = NO
That causes _DEBUG to be set. When I comment out HOST_OPT=NO in that file then runtests does not generate assert errors on windows-x64-static.
I've committed 207efca15cf471bbc2990cbd336000e04dcfcd22 as a workaround. @MarkRivers can you see if this gets rid of all the assertion failures?
Before downloading your change I ran the tests on VS2010, VS2015, and VS2017. All were set to HOST_OPT=NO, so the _DEBUG flag would be set which enables the assert.
VS2010 failed with the assert errors I reported previously. VS2015 and VS2017 did not have the assert failures.
I then downloaded your fix and tested again on VS2010. The assert problem is gone. :+1:
It should be OK to only have your fix apply to VS versions prior to VS2015.
0b6b01ef83fa7100c2ebfdb82e8d5a2c14081a09 changes the condition to
#if defined(_MSC_VER) && _MSC_VER<=1600
Released with Base 7.0.2
It seems that the MSVC implementation of some STL requires that iterators never be NULL. This triggers an issue as shared_vector<> uses raw pointers as iterators, and gives NULL for an empty array.
@MarkRivers reports that this trigger copious assertion dialogs.
In this instance std::equal() asserts that the third argument is not NULL.