We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c67eabd commit 8d125d0Copy full SHA for 8d125d0
src/BenchmarkDotNet/Disassemblers/ClrMdV2Disassembler.cs
@@ -31,9 +31,17 @@ private static ulong GetMinValidAddress()
31
};
32
if (RuntimeInformation.IsLinux())
33
{
34
- string? minAddrResult = ProcessHelper.RunAndReadOutput("/bin/bash", "sudo cat /proc/sys/vm/mmap_min_addr");
35
- ulong.TryParse(minAddrResult, out ulong minAddress);
36
- return minAddress;
+ try
+ {
+ if (File.Exists("/proc/sys/vm/mmap_min_addr"))
37
38
+ string? minAddrResult = File.ReadAllText("/proc/sys/vm/mmap_min_addr");
39
+ ulong.TryParse(minAddrResult, out ulong minAddress);
40
+ return minAddress;
41
+ }
42
43
+ catch { }
44
+ return 0;
45
}
46
throw new NotSupportedException($"{System.Runtime.InteropServices.RuntimeInformation.OSDescription} is not supported");
47
0 commit comments