Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

blep/vs2019_span_bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimal code for reproduction of memmove optimization bug with Visual Studio 2019

Status: Microsoft has confirmed that the issue is related to the new memmove optimization. The fix available in VS 2019 16.3.0 preview 2 (download on 2019-08-26) works (see linked issue at the bottom).

Last reproduced on 2019-08-07 with VS 2019 16.2.

A small bug reproduction of a unit test that fail when executed with Visual Studio 2019 (as of 2019-05-25). Works fine in debug build or VS 2018.

I suspect that the issue is caused by the new memmove intrinsic (could also be some Undefined Behavior I'm not seeing):

  • test pass if memmove is called via a function pointer
  • test pass if size passed to memmove is large (change array size to 50 and number of items to move accordingly)

Release build output:

Before:   10, 20, 30, 40, 50,
After:    10, 20, 20, 30, 30,
Expected: 10, 20, 20, 30, 40,

FAILED!

Debug build output:

Before:   10, 20, 30, 40, 50,
After:    10, 20, 20, 30, 40,
Expected: 10, 20, 20, 30, 40,

OK

Problem on Microsoft Developer Community

https://developercommunity.visualstudio.com/content/problem/583227/vs-2019-cl-1921277022-memmove-instrinsic-optimizat.html

Baptiste Lepilleur.

About

Reproduction of memmove optimization bug with Visual Studio 2019 in Release build.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published