alliedmodders / sourcemod

SourceMod - Source Engine Scripting and Administration
http://www.sourcemod.net/
990 stars 425 forks source link

Using SM 1.12.0.7165 compiler willl cause server crash #2220

Open fbef0102 opened 1 week ago

fbef0102 commented 1 week ago

sm version

 SourceMod Version Information:
    SourceMod Version: 1.12.0.7165
    SourcePawn Engine: 1.12.0.7165, jit-x86 (build 1.12.0.7165)

Game: L4D2 System: Windows

Compile the following the codes with SourcePawn Compiler 1.12.0.7165 -> launch game -> type !test -> server crash

public void OnPluginStart()
{
    RegConsoleCmd("sm_test",        sm_test);
}

Action sm_test(int client, int args)
{
    float AAA[3];
    static float BBB[3] = {0.1,0.2,0.3};

    // crash
    AAA = BBB;

    // not crash
    AAA[0] = BBB[0];
    AAA[1] = BBB[1];
    AAA[2] = BBB[2];

    return Plugin_Handled;
}

It won't happen in the previous compiler version: 1.12.0.7164 or 1.11

A1mDev commented 4 days ago

Related alliedmodders/sourcepawn/issues/977