Skip to content

Conversation

@MichalStrehovsky
Copy link
Member

@MichalStrehovsky MichalStrehovsky commented Apr 22, 2024

Contributes to #101228.

I believe what the test is doing is not trim safe and only succeeds due to lucky IL trimming implementation details.

I believe what the test is doing is not trim safe and only succeeds due to lucky IL trimming implementation details.
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

public TestEventSource() : base(EventSourceSettings.EtwSelfDescribingEventFormat) { }

[Event(1)]
[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(TestSubData))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this worked with ILLink because the property was accessed in IL (both the getter and the setter).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, calling the getter or setter keeps the property right now.

The property could still be removed in theory since what is used is just getter/setter method, but illink never does it right now (it could do it if DebuggerSupport=false, since it makes debugging sub-optimal). It's what I called "lucky IL trimming implementation details".

@MichalStrehovsky MichalStrehovsky merged commit aa9edcc into dotnet:main Apr 22, 2024
@MichalStrehovsky MichalStrehovsky deleted the tracingtests branch April 22, 2024 21:33
matouskozak pushed a commit to matouskozak/runtime that referenced this pull request Apr 30, 2024
I believe what the test is doing is not trim safe and only succeeds due to lucky IL trimming implementation details.
michaelgsharp pushed a commit to michaelgsharp/runtime that referenced this pull request May 9, 2024
I believe what the test is doing is not trim safe and only succeeds due to lucky IL trimming implementation details.
@github-actions github-actions bot locked and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants