Remove Herobrine

Idk according to the changelog I already did this once but clearly I didn't so ???
This commit is contained in:
Pieter-Jan Briers
2024-01-11 02:01:23 +01:00
parent 8cbc05840f
commit 2462c906b3
4 changed files with 1 additions and 47 deletions

View File

@@ -48,7 +48,7 @@ END TEMPLATE-->
### Other
*None yet*
* Removed glibc version check warning.
### Internal

View File

@@ -35,8 +35,6 @@ namespace Robust.Client
throw new InvalidOperationException("Cannot start twice!");
}
GlibcBug.Check();
_hasStarted = true;
if (CommandLineArgs.TryParse(args, out var parsed))

View File

@@ -32,8 +32,6 @@ namespace Robust.Server
throw new InvalidOperationException("Cannot start twice!");
}
GlibcBug.Check();
_hasStarted = true;
if (!CommandLineArgs.TryParse(args, out var parsed))

View File

@@ -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();
}