Infer# is an interprocedural and scalable static code analyzer for C#. Via the capabilities of Facebook's Infer, this tool detects null dereferences, resource leaks, and thread-safety violations. It also performs taint flow tracking to detect critical security vulnerabilities like SQL injections.
When running as a part of github action, with my private repository that contains :
namespace WebChat.StateStore { public abstract record FailureAction(string ErrorMessage); }
The infersharp crashes with
More than two space-separated tokens in: System.Void modreq(System.Runtime.CompilerServices.IsExternalInit) WebChat.StateStore.FailureAction::set_ErrorMessage(System.String)
More than two space-separated tokens in: System.Void modreq(System.Runtime.CompilerServices.IsExternalInit) WebChat.StateStore.FailureAction::set_ErrorMessage(System.String)
Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Cilsil.Services.ServiceExecutionException: Popping on empty stack at method: System.Void modreq(System.Runtime.CompilerServices.IsExternalInit) modreq(System.Runtime.CompilerServices.IsExternalInit) WebChat.StateStore.FailureAction::set_ErrorMessage(System.String) instruction: IL_0007: ret location: Line 3
at Cilsil.Utils.ProgramState.Pop() in /app/Cilsil/Utils/ProgramState.cs:line 241
at Cilsil.Cil.Parsers.RetParser.ParseCilInstructionInternal(Instruction instruction, ProgramState state) in /app/Cilsil/Cil/Parsers/RetParser.cs:line 18
at Cilsil.Cil.Parsers.InstructionParser.ParseCilInstruction(Instruction instruction, ProgramState state) in /app/Cilsil/Cil/Parsers/InstructionParser.cs:line 84
at Cilsil.Services.CfgParserService.ComputeMethodCfg(MethodDefinition method) in /app/Cilsil/Services/CfgParserService.cs:line 113
at Cilsil.Services.CfgParserService.Execute() in /app/Cilsil/Services/CfgParserService.cs:line 49
at Cilsil.Program.ExecuteTranslation(String[] paths, String printprocs) in /app/Cilsil/Program.cs:line 123
at Cilsil.Program.Translate(String[] paths, String printprocs, String outcfg, String cfgtxt, String outtenv, String dot) in /app/Cilsil/Program.cs:line 95
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>cDisplayClass2_0.<b0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Invocation.InvocationExtensions.<>c.<b16_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Invocation.InvocationExtensions.<>cDisplayClass8_0.<b0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Invocation.InvocationExtensions.<>c.<b7_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Invocation.InvocationExtensions.<>c.<b6_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Invocation.InvocationExtensions.<>c.<b__14_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass3_0.<b0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Invocation.InvocationExtensions.<>c.<b17_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Invocation.InvocationExtensions.<>c__DisplayClass5_0.<b__0>d.MoveNext()
When running as a part of github action, with my private repository that contains :
namespace WebChat.StateStore { public abstract record FailureAction(string ErrorMessage); }
The infersharp crashes with
More than two space-separated tokens in: System.Void modreq(System.Runtime.CompilerServices.IsExternalInit) WebChat.StateStore.FailureAction::set_ErrorMessage(System.String) More than two space-separated tokens in: System.Void modreq(System.Runtime.CompilerServices.IsExternalInit) WebChat.StateStore.FailureAction::set_ErrorMessage(System.String) Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Cilsil.Services.ServiceExecutionException: Popping on empty stack at method: System.Void modreq(System.Runtime.CompilerServices.IsExternalInit) modreq(System.Runtime.CompilerServices.IsExternalInit) WebChat.StateStore.FailureAction::set_ErrorMessage(System.String) instruction: IL_0007: ret location: Line 3 at Cilsil.Utils.ProgramState.Pop() in /app/Cilsil/Utils/ProgramState.cs:line 241 at Cilsil.Cil.Parsers.RetParser.ParseCilInstructionInternal(Instruction instruction, ProgramState state) in /app/Cilsil/Cil/Parsers/RetParser.cs:line 18 at Cilsil.Cil.Parsers.InstructionParser.ParseCilInstruction(Instruction instruction, ProgramState state) in /app/Cilsil/Cil/Parsers/InstructionParser.cs:line 84 at Cilsil.Services.CfgParserService.ComputeMethodCfg(MethodDefinition method) in /app/Cilsil/Services/CfgParserService.cs:line 113 at Cilsil.Services.CfgParserService.Execute() in /app/Cilsil/Services/CfgParserService.cs:line 49 at Cilsil.Program.ExecuteTranslation(String[] paths, String printprocs) in /app/Cilsil/Program.cs:line 123 at Cilsil.Program.Translate(String[] paths, String printprocs, String outcfg, String cfgtxt, String outtenv, String dot) in /app/Cilsil/Program.cs:line 95 --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Delegate.DynamicInvokeImpl(Object[] args) at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context) at System.CommandLine.Invocation.InvocationPipeline.<>cDisplayClass2_0.<b0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Invocation.InvocationExtensions.<>c.<b 16_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Invocation.InvocationExtensions.<>c DisplayClass8_0.<b0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Invocation.InvocationExtensions.<>c.<b 7_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Invocation.InvocationExtensions.<>c.<b6_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Invocation.InvocationExtensions.<>c.<b__14_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c DisplayClass3_0.<b0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Invocation.InvocationExtensions.<>c.<b 17_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Invocation.InvocationExtensions.<>c__DisplayClass5_0.<b__0>d.MoveNext()
Full log: infer_crash.log