aws / aws/aws-lambda-dotnet

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

Open
#2,021 3 comments 0 reactions 0 assignees View on GitHub
bug module/lambda-test-tool p2 queued
Dominant language
C#
Stars
1.7k
Forks
503
Avg merge
1d 5h
Merged PRs (30d)
18

Description

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.