Hi Sherer, thank you very much for your detailed answer.
I'm on O2 flag by default, I remember changing that already but didn't get much better results in the diagnosis so I put it back to normal.
As it's a test server now, I'll try to keep it to default O0 for now on.
Here are the compiler flags I use then:
-m32 -g -Wall -O -pipe -fexceptions -std=gnu++17 -fno-strict-aliasing -pthread -D_THREAD_SAFE -DNDEBUG -fstack-protector-all
The second error, with tr1 lists was where the crashes first started.
I then did change all the tr1 lists in the sources to std lists, and did the same for every boost lists.
I then got erreor with affects, I remember removing the boost affect_pool in affect.cpp, to make it use the default M2 allocator as if DEBUG_ALLOC was declared in this file.
For the third error, I remember having some troubles with the memory usage of the server back then.
I'm not sure if it's exactly at that time, but the memory usage of my machine was nearly at 100% even with the game not started.
The machine had not been restarted for years. Until now after the restart the memory usage is fine.
At this time, I though that the memory corruption could be because of a memory problem on my server, so I rent a new machine but still got crashes on it.
But, the error seems to be part of the first one, that I got yesterday after 35 days without reboot and crashes (and very very few players on it so it's not really showing that it crashes less than before).
I did an update, so I restarted the game, let some 3-5 players try it and got a crash after a few hours while a player attempted the refinement of ores on a guild alchemist.
It worked 3 times, and then it crashed giving a backtrace to luaM_realloc because it couldn't allocate memory.
For the checkpointing, everything is as it is by default, I haven't touched anything about that.
To be sure, I'll only be able to check tomorrow.
Thanks for the proposal, I'll keep that in mind.