You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like this happened because of a VS2019 compiler update from 14.21.27702 to
14.22.27905. Previous builds are fine with the same code.
On 2019-08-11 13:19:46 +0000, Marius Elvert wrote:
I've implemented a work-around by adding a memset that calls SDL_memset (See the patch to SDL_string in bincrafters/conan-sdl2#25). No idea what generates the implicit memset here - does not seem to be one of the ordinary array-inits.
On 2019-08-24 12:18:42 +0000, Bodie wrote:
Hello,
I recently became affected by this bug after updating to the latest Visual Studio 2019 (16.2.3.) I'm building SDL2 as a dependency in a CMake project, and the bug occurs when I build on Windows 10 (10.0.17763 Build 17763) with -DCMAKE_BUILD_TYPE=Release using VS2019 (MSVC 19.22.27905.0).
I was able to build successfully using these parameters in the previous version of VS2019, so my suspicion is that this is a Microsoft implementation issue.
Thanks for filing.
On 2019-08-24 12:47:11 +0000, Bodie wrote:
I've filed a bug report in Visual Studio using the title "Unexpected implicit memset in release-optimized build causes LNK2019 in VS2019 16.2.3" if anyone cares to upvote it.
On 2019-08-24 15:19:00 +0000, Sylvain wrote:
your log says it's in
SDL_string.c.obj : error LNK2019: unresolved external symbol memset referenced in function SDL_vsnprintf_REAL
look at the file:
src/stdlib/SDL_string.c
see which SDL_vsnprintf gets compiled.
find out which line adds an implicit memset ...
On 2019-08-24 20:48:28 +0000, Ryan C. Gordon wrote:
So the usual things that encourage Visual Studio to generate a memset call (a loop that initializes all elements of an array to zero, a local array with an explicit initializer) aren't present in SDL_vsnprintf(). Can you attach SDL_string.c.obj to this report so I can see what the new Visual Studio did?
Thanks,
--ryan.
On 2019-08-24 20:53:18 +0000, Ryan C. Gordon wrote:
(In reply to Ryan C. Gordon from comment # 5)
So the usual things that encourage Visual Studio to generate a memset call
(a loop that initializes all elements of an array to zero, a local array
with an explicit initializer) aren't present in SDL_vsnprintf().
Actually, I was looking at the wrong #ifdef, there are a few possible suspects, like this:
while (len--) {
if (textstart+len < end) {
textstart[len] = fill;
}
}
...where the compiler might have gotten smart enough to slot a memset in place of that loop. Send in the .obj and I'll look at it.
--ryan.
On 2019-08-24 23:27:12 +0000, Sam Lantinga wrote:
Actually, why don't we turn that into an SDL_memset()?
On 2019-09-02 04:30:46 +0000, Ryan C. Gordon wrote:
(In reply to Sam Lantinga from comment # 7)
Actually, why don't we turn that into an SDL_memset()?
We can, I just don't want to play whack-a-mole if it turns out there's three other places that need this, which is why I wanted the .obj file. :)
--ryan.
On 2019-09-20 20:47:35 +0000, Ryan C. Gordon wrote:
We're changing how we do SDL release versions; now releases will be even numbers (2.0.10, 2.0.12, etc), and as soon as we tag a release, we'll move the internal version number to an odd number (2.0.12 ships, we tag the latest in revision control as 2.0.13 immediately, which will become 2.0.14 on release, etc).
As such, I'm moving the bugs tagged with target-2.0.11 to target 2.0.12. Sorry if you get a lot of email from this change!
Thanks,
--ryan.
On 2019-09-20 20:48:42 +0000, Ryan C. Gordon wrote:
We're changing how we do SDL release versions; now releases will be even numbers (2.0.10, 2.0.12, etc), and as soon as we tag a release, we'll move the internal version number to an odd number (2.0.12 ships, we tag the latest in revision control as 2.0.13 immediately, which will become 2.0.14 on release, etc).
As such, I'm moving the bugs tagged with target-2.0.11 to target 2.0.12. Sorry if you get a lot of email from this change!
Thanks,
--ryan.
On 2019-09-26 16:58:03 +0000, Ryan C. Gordon wrote:
It's worth noting that there are a ton of loops in this file that are just as likely to get replaced with a memset() or memcpy()...they're in SDL_memset and SDL_memcpy, of course.
I'm wondering if we should just implement a few of these standard functions when #ifdef _MSC_VER and not export them outside the DLL, so the next time Visual Studio inserts a memset() call, it resolves to inside SDL, and nothing external see is. There are probably a million ways this can go wrong, though.
For now, I'm closing this bug. If the problem still persists, please reopen.
--ryan.
The text was updated successfully, but these errors were encountered:
This bug report was migrated from our old Bugzilla tracker.
Reported in version: 2.0.10
Reported for operating system, platform: Windows 10, x86_64
Comments on the original bug report:
On 2019-08-11 11:48:06 +0000, Marius Elvert wrote:
On 2019-08-11 13:19:46 +0000, Marius Elvert wrote:
On 2019-08-24 12:18:42 +0000, Bodie wrote:
On 2019-08-24 12:47:11 +0000, Bodie wrote:
On 2019-08-24 15:19:00 +0000, Sylvain wrote:
On 2019-08-24 20:48:28 +0000, Ryan C. Gordon wrote:
On 2019-08-24 20:53:18 +0000, Ryan C. Gordon wrote:
On 2019-08-24 23:27:12 +0000, Sam Lantinga wrote:
On 2019-09-02 04:30:46 +0000, Ryan C. Gordon wrote:
On 2019-09-20 20:47:35 +0000, Ryan C. Gordon wrote:
On 2019-09-20 20:48:42 +0000, Ryan C. Gordon wrote:
On 2019-09-26 16:58:03 +0000, Ryan C. Gordon wrote:
The text was updated successfully, but these errors were encountered: