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

Fix setting /guard:cf for tests #130

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vmoroz
Copy link
Member

@vmoroz vmoroz commented Sep 9, 2022

Summary

Some of the Hermes unit tests are failing with the error:

Exception has occurred: W32/0xC0000409
Unhandled exception at 0x00007FF8231D2240 (ntdll.dll) in HermesBCGenTests.exe: Indirect call guard check detected invalid 

The investigation has shown that some libraries miss /guard:cf settings and the hermes::vm::Buffer implementation is spread between different libraries.

In this PR we fix the issue by changing the way we are setting the /guard:cf flag and other security related flags.

After this change our hermes.dll and hermesinspector.dll have no BinSkim issues besides three disabled warnings.

Test Plan

All unit tests are passing.

Microsoft Reviewers: Open in CodeFlow

@vmoroz vmoroz requested review from dannyvv and tudorms September 9, 2022 18:48
@vmoroz vmoroz requested a review from a team as a code owner September 9, 2022 18:48
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

Successfully merging this pull request may close these issues.

3 participants