Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion xml/System.Reflection.Emit/AssemblyBuilder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,18 @@
</Attributes>
<Docs>
<summary>Defines and represents a dynamic assembly.</summary>
<remarks>For more information about this API, see <see href="/dotnet/fundamentals/runtime-libraries/system-reflection-emit-assemblybuilder">Supplemental API remarks for AssemblyBuilder</see>.</remarks>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
For more information about this API, see [Supplemental API remarks for AssemblyBuilder](/dotnet/fundamentals/runtime-libraries/system-reflection-emit-assemblybuilder).
> [!WARNING]
> `AssemblyBuilder` APIs require a fully trusted environment with trusted input, similarly as other technologies such as compilers. There are no restrictions other than basic validation for generated IL, for member name, count and associated metadata such as custom attributes, that the AssemblyBuilder can contain.
]]>
</format>
</remarks>
<example>
<format type="text/markdown"><![CDATA[
The following code example shows how to define and use a dynamic assembly. The example assembly contains one type, `MyDynamicType`, that has a private field, a property that gets and sets the private field, constructors that initialize the private field, and a method that multiplies a user-supplied number by the private field value and returns the result.
Expand Down
8 changes: 8 additions & 0 deletions xml/System.Reflection.Emit/ILGenerator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@
MSIL is used as input to a just-in-time (JIT) compiler.
> [!WARNING]
> There are no restrictions, other than basic validation for ILGenerator APIs that used for producing method IL. If untrusted input is used for producing IL:
> - IL and metadata can contain secrets provided by the consumer.
> - IL can be invalid such as not having a balanced push vs. pop opcodes, or invalid operands for a given opcode.
> - Can contain any code that may, for example, deadlock, have infinite stack recursion, or have an infinite loop.
> - IL can load and execute code on any other reachable assembly.
>
> Such code can do whatever it wishes when the method is loaded and executed. To restrict such vulnerabilities `ILGenerator` require a fully trusted environment with trusted input.
]]></format>
</remarks>
</Docs>
Expand Down
12 changes: 11 additions & 1 deletion xml/System.Reflection.Emit/PersistedAssemblyBuilder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,17 @@
</Attributes>
<Docs>
<summary>Provides an AssemblyBuilder implementation that can persist assembly to a disk or stream.</summary>
<remarks>To be added.</remarks>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
For more information about this API, see [Persisted dynamic assemblies in .NET](/dotnet/fundamentals/runtime-libraries/system-reflection-emit-persistedassemblybuilder).
> [!WARNING]
> `PersistedAssemblyBuilder` APIs require a fully trusted environment with trusted input, similarly as other technologies such as compilers. There are no restrictions other than basic validation for generated IL, for member name, count and associated metadata such as custom attributes, that the AssemblyBuilder can contain.
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
Expand Down