Skip to content

amazon.lambda.testtool-8.0 incorrectly compiled with CET enabled #2021

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

Open
1 task
delmyers opened this issue Mar 24, 2025 · 3 comments
Open
1 task

amazon.lambda.testtool-8.0 incorrectly compiled with CET enabled #2021

delmyers opened this issue Mar 24, 2025 · 3 comments
Labels
bug This issue is a bug. module/lambda-test-tool p2 This is a standard priority issue queued

Comments

@delmyers
Copy link

Describe the bug

Visual Studio has been getting bug reports that debugging AWS lambda functions using the .NET lambda test tools does not work. We've tracked this down to the fact that, somehow, amazon.lambda.testtool-8.0 is being compiled with Control-Flow Enforcement Technology (CET) enabled. CET is not compatible with .NET 8, though it is with .NET 9. Under normal circumstances, CET cannot be enabled for .NET projects. There must be some custom configuration that is turning it on during build, though I've not been able to track it down in this code base. As a result, customers are ending up with erratic stepping behavior when using amazon.lambda.testtool-8.0.

You can see that CET is enabled in the executable by running the following command:

dumpbin /headers dotnet-lambda-test-tool-8.0.exe

After the 'Debug Directories' entry, you will see a couple of lines that look like this:

00000001 extended DLL characteristics
           CET compatible

Indicating that CET has been enabled for the binary.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

When running dumpbin /headers there should be no data indicating that CET has been enabled for the binary.

Current Behavior

CET is enabled.

Reproduction Steps

dumpbin /headers dotnet-lambda-test-tool-8.0.exe

After the 'Debug Directories' entry, you will see a couple of lines that look like this:

00000001 extended DLL characteristics
           CET compatible

Possible Solution

No response

Additional Information/Context

No response

AWS .NET SDK and/or Package version used

dotnet-lambda-test-tool-8.0

Targeted .NET Platform

.NET 8

Operating System and version

Windows 11

@delmyers delmyers added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 24, 2025
@normj
Copy link
Member

normj commented Mar 25, 2025

@delmyers Thanks for the info. We aren't doing anything specific about enabling CET, it wasn't even something I knew about. The build image does have the .NET 9 SDK installed would even though the project is targeting .NET 8. Would cause CET to be enabled?

@delmyers
Copy link
Author

@normj If you can help me figure out how to build the executables, I might be able to check the build logs and figure out what is going on. I wasn't able to figure out how to do that in a short amount of time, though.

@ashishdhingra ashishdhingra added investigating This issue is being investigated and/or work is in progress to resolve the issue. module/lambda-test-tool p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Mar 25, 2025
@ashishdhingra ashishdhingra self-assigned this Mar 25, 2025
@ashishdhingra ashishdhingra added needs-review and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Mar 25, 2025
@ashishdhingra ashishdhingra removed their assignment Mar 25, 2025
@ashishdhingra
Copy link
Contributor

Just FYI dotnet/docs#42600

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. module/lambda-test-tool p2 This is a standard priority issue queued
Projects
None yet
Development

No branches or pull requests

3 participants