nosoop / SMExt-SourceScramble

A SourceMod extension for dealing with memory-related operations.
https://forums.alliedmods.net/showthread.php?p=2657347
GNU General Public License v3.0
83 stars 12 forks source link

Adding 'linux64' subsections crashes the server #18

Closed naydef closed 9 months ago

naydef commented 9 months ago

The extension crashes the server on load (happening on 32-bit version of the server, of course). I'm doing some "premature" 64-bit gamedata additions to our server.

Accelerator link: https://crash.limetech.org/s3znrvr2mctk

I guess it's crashing due to missing argument for the format specifier: https://github.com/nosoop/SMExt-SourceScramble/blob/7754d0d5cf1b601a1961636439ed6f87b36dde8e/userconf/mempatches.cpp#L109

I can also notice that there's no support for the linux64 platform, so I guess this should be added, as well as 64-bit compiled version of the extension.

Here's a example config that causes the crash:

"Games"
{
    "tf"
    {
        "Signatures"
        {
            "CTFGrenadePipebombProjectile::PipebombTouch"
            {
                "library" "server"
                "windows" "\x53\x8B\xDC\x83\xEC\x08\x83\xE4\xF0\x83\xC4\x04\x55\x8B\x6B\x04\x89\x6C\x24\x04\x8B\xEC\x81\xEC\x2A\x2A\x2A\x2A\x56\x57\x8B\xF9\xE8\x2A\x2A\x2A\x2A\x8B\x73\x08"
                "linux" "@_ZN28CTFGrenadePipebombProjectile13PipebombTouchEP11CBaseEntity"
                "linux64" "@_ZN28CTFGrenadePipebombProjectile13PipebombTouchEP11CBaseEntity"
            }
        }
        "MemPatches"
        {
            "CTFGrenadePipebombProjectile::PipebombTouch#792"
            {
                "signature" "CTFGrenadePipebombProjectile::PipebombTouch"
                "windows"
                {
                    "offset"    "437h"
                    "verify"    "\x75"
                    "patch"     "\xEB"
                }
                "linux"
                {
                    "offset"    "733h"
                    "verify"    "\x75"
                    "patch"     "\xEB"
                }
                "linux64"
                {
                    "offset"    "95Eh"
                    "verify"    "\x0F\x84\xD3\x02\x00\x00"
                    "patch"     "\x90\x90\x90\x90\x90\x90"
                }
            }
        }
    }
}
nosoop commented 9 months ago

Thanks; 64-bit support will come at some point.