Constant crash on the same instruction 'rep movs'
I can’t figure out what the problem is, different plugins crash on one instruction 'rep movs'. I'm using the latest version of sourcepawn.
Can you post a crash dump or a stack trace, please?
I did not describe that this is a compiler problem, because if you rebuild the plugin using a new compiler, then after loading this plugin the server will crash
I did not describe that this is a compiler problem, because if you rebuild the plugin using a new compiler, then after loading this plugin the server will crash
That's cool, could you post a text version of the complete stack trace instead of a grainy screenshot of part of it which nobody is going to bother transcribing by hand? Or, again, an actual crash dump, which would be more helpful.
Thanks Steph
I know that it’s not good to write such code, but I found such code in a plugin, and it is this that crashes the server, other plugins with the same instructions also crashed, but I don’t know which parts of the code were compiled incorrectly. Perhaps the code below will give some insight into why this issue might occur. Use source mod 1.12.7140 for testing (update sourcepawn submodule (#2146))
#include <sourcemod>
#define MAX_LEN 32
public void OnPluginStart()
{
RegConsoleCmd("sm_getchar", Cmd_GetChar);
}
Action Cmd_GetChar(int iClient, int iArgs)
{
PrintToServer("%s", FooterGet());
return Plugin_Handled;
}
char[] FooterGet()
{
static char buffer[MAX_LEN];
Format(buffer, sizeof(buffer), "asdada");
return buffer;
}
Changes in commit ceffea8 cause crash
Thanks, I can reproduce this.
Thanks for the reduced test case, this is fixed on master.