mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Remove Herobrine
Idk according to the changelog I already did this once but clearly I didn't so ???
This commit is contained in:
@@ -48,7 +48,7 @@ END TEMPLATE-->
|
||||
|
||||
### Other
|
||||
|
||||
*None yet*
|
||||
* Removed glibc version check warning.
|
||||
|
||||
### Internal
|
||||
|
||||
|
||||
@@ -35,8 +35,6 @@ namespace Robust.Client
|
||||
throw new InvalidOperationException("Cannot start twice!");
|
||||
}
|
||||
|
||||
GlibcBug.Check();
|
||||
|
||||
_hasStarted = true;
|
||||
|
||||
if (CommandLineArgs.TryParse(args, out var parsed))
|
||||
|
||||
@@ -32,8 +32,6 @@ namespace Robust.Server
|
||||
throw new InvalidOperationException("Cannot start twice!");
|
||||
}
|
||||
|
||||
GlibcBug.Check();
|
||||
|
||||
_hasStarted = true;
|
||||
|
||||
if (!CommandLineArgs.TryParse(args, out var parsed))
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using C = System.Console;
|
||||
|
||||
namespace Robust.Shared.Utility;
|
||||
|
||||
internal static unsafe class GlibcBug
|
||||
{
|
||||
/// <summary>
|
||||
/// Check for the glibc 2.35 DSO bug and log a warning if necessary.
|
||||
/// </summary>
|
||||
public static void Check()
|
||||
{
|
||||
if (!OperatingSystem.IsLinux())
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
var versionString = Marshal.PtrToStringUTF8((IntPtr) gnu_get_libc_version());
|
||||
var version = Version.Parse(versionString!);
|
||||
var badVersion = new Version(2, 35);
|
||||
var fixedVersion = new Version(2, 37);
|
||||
if (version >= badVersion && version < fixedVersion)
|
||||
{
|
||||
C.ForegroundColor = ConsoleColor.Yellow;
|
||||
C.WriteLine($"!!!WARNING!!!: glibc {badVersion} or higher detected (you have {version}).");
|
||||
C.WriteLine("If anything misbehaves (weird native crashes, library load failures), try setting GLIBC_TUNABLES=glibc.rtld.dynamic_sort=1 as environment variable.");
|
||||
C.WriteLine("This is a severe glibc bug introduced in glibc 2.35. See https://github.com/space-wizards/RobustToolbox/issues/2563 for details");
|
||||
C.WriteLine("We cannot detect if you are susceptible or whether you have correctly applied the fix. This warning cannot be removed.");
|
||||
C.ResetColor();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Couldn't figure out glibc version, whatever.
|
||||
// Hell maybe you're not even using glibc.
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport("libc.so.6")]
|
||||
private static extern byte* gnu_get_libc_version();
|
||||
}
|
||||
Reference in New Issue
Block a user