feat(ghidra): integrate optional NativeAOT metadata recovery (#748)
* feat(ghidra): integrate optional NativeAOT metadata recovery * fix(ghidra): bind extension snapshots to configured artifacts * test(ghidra): verify lazy NativeAOT startup failures * fix(ghidra): preserve NativeAOT failure reasons and coverage * fix(ghidra): preserve NativeAOT x64 calling conventions * test(ghidra): guard recovered NativeAOT method conventions * fix(ghidra): reject blocking extension file inputs * fix(ghidra): diagnose incompatible NativeAOT extension classes * test(ghidra): verify real extension initialization failures * fix(ghidra): keep extension descriptor fields optional
This commit is contained in:
Vendored
+39
@@ -0,0 +1,39 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
interface IProbe { int Compute(int value); }
|
||||
|
||||
class BaseProbe
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public virtual int Compute(int value) => value * 7 + 3;
|
||||
public override string ToString() => "REA_NATIVEAOT_BASE";
|
||||
}
|
||||
|
||||
sealed class DerivedProbe : BaseProbe, IProbe
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public override int Compute(int value) => value * 11 + 5;
|
||||
public override string ToString() => "REA_NATIVEAOT_DERIVED";
|
||||
}
|
||||
|
||||
static class Program
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
static int Dispatch(BaseProbe value, int input) => value.Compute(input);
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
static int DispatchInterface(IProbe value, int input) => value.Compute(input);
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
static int Consume(string value) => value.Length;
|
||||
|
||||
static int Main(string[] args)
|
||||
{
|
||||
BaseProbe[] probes = { new BaseProbe(), new DerivedProbe() };
|
||||
int result = Dispatch(probes[args.Length % probes.Length], args.Length);
|
||||
result += DispatchInterface(new DerivedProbe(), args.Length);
|
||||
result += Consume("REA_NATIVEAOT_FROZEN");
|
||||
result += Consume(probes[args.Length % probes.Length].ToString());
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user