-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Update fuzzing infra to build and use the shared framework #108555
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
The bot's also working again now MihuBot/runtime-utils@5466698 |
Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
Update deploy-to-onefuzz pipeline
flAllocationType: VirtualAllocAllocationType.MEM_RESERVE | VirtualAllocAllocationType.MEM_COMMIT, | ||
flProtect: VirtualAllocProtection.PAGE_NOACCESS); | ||
VirtualAllocHandle handle; | ||
checked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this checked added due to a bug? It seems like it would only throw on 32-bit platforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not due to a bug, after changing the project build with current runtime settings many analyzer diagnostics found that are fixed or suppressed with the PR.
CA2020 Starting with .NET 7 the explicit conversion '(IntPtr)Int64' will not throw when overflowing in an unchecked context. Wrap the expression with a 'checked' statement to restore the .NET 6 behavior.
Flagged at row 38: dwSize: (IntPtr)totalBytesToAllocate /* cast throws OverflowException if out of range */,
Given that this type is for testing, and also base on the comment I assumed it is important to restore the overflowing behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppressed have all other warnings for this BoundedMemory
type, now after moving <IsTestSupportProject>true</IsTestSupportProject>
property above importing parent Directory.Build.props
this type is not being analyzed anymore, same as all other test types. I can revert this and other suppressions with my other PR
dotnet build | ||
``` | ||
|
||
Now you can run `run.bat`, which will create separate directories for each fuzzing target, instrument the relevant assemblies, and generate a helper script for running them locally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: "Now you can" and "You can now" a little below seems unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can update with my other PR
…8555) * Update fuzzing infra to build and use the shared framework * Update deploy-to-onefuzz pipeline * Apply suggestions from code review Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com> --------- Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
Fuzzing infra is currently broken because of #106599, because it is partially integrated with the repo workflow. In order to fix this failure, we need to integrate it completely, that means need to fix #107204:
nuget.config
as it became same as the repo config in the root, also removedDirectory.Build.targets
that was emptyFurther
MihuBot
need to be updated as needed, might also need to updateonefuzz
deployment scripts CC @MihaZupan