Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BinSkim BA2014 compatibility with the new Arm64EC files #979

Open
shaopeng-gh opened this issue Jan 19, 2024 · 0 comments
Open

BinSkim BA2014 compatibility with the new Arm64EC files #979

shaopeng-gh opened this issue Jan 19, 2024 · 0 comments

Comments

@shaopeng-gh
Copy link
Collaborator

User report that BinSkim BA2014 could have compatibility issue with the new Arm64EC files

https://learn.microsoft.com/en-us/windows/arm/arm64ec-build#msbuild-projects
With the HelloWorld app created using above guide, binskim complain about the function noCheckBuffers.
(Some other functions could be reported as well, e.g. _mm_setcsr)

This issue is created to investigate if improvements can be made.

#include
<immintrin.h>


using
namespace
std;


typedef
struct {
   
int
x[20];
}
BUFFER;
static
__declspec(safebuffers)
   
int
noCheckBuffers() {
   
BUFFER
ncb;
   
for(int
i
=0;
i<20;i++){
       
cout
<<
ncb.x[i];
    }
   
return
0;
}


int
main()
{
    // try my own function
   
noCheckBuffers();


    // try the same function as in the bug report
   
_mm_setcsr(555);
   
unsigned
int
a
=
_mm_getcsr();
   
cout
<<
a
<<
endl;
   
return
0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant