After running a program on the server for a while, the process does not exist.
Release core file limit: Ulimit-c Unlimited
Waiting to produce core files
Analyze core Files
(GDB) bt
#0 0x008711d3 in strlen () from/lib/libc.so.6
#1 0x00840c0e in vfprintf () from/lib/libc.so.6
#2 0x008613f4 in vsnprintf () from/lib/libc.so.6
#3 0x00846ec5 in snprintf () from/lib/libc.so.6
#4 0x08050598 in Chashmdm::add (this=0x8073000, domain=0x2f36925c "xn--chinaka%64s-.com", tfrstvst=1372868283,
nhouravgfrqncy=30) at./src/chashmdm.cpp:36
#5 0x0805244d in Ctasktime::run (this=0x9d712d0) at./src/ctasktime.cpp:117
#6 0x080589f6 in ThreadRun (pthread=0x9d712d0) at src/common/thread.cpp:24
#7 0x0097d832 in Start_thread () from/lib/libpthread.so.0
#8 0x008d2e0e in Clone () from/lib/libc.so.6
(GDB) L chashmdm.cpp:36
snprintf (data.dm, sizeof (DATA.DM), DM);
The formatted output was omitted:, "%s", causing snprintf to take the next parameter domain as a format string, when encountering the URL xn--chinaka%64s-.com, the%64s as a format character to explain,
But without the%64s parameters, the program crashes.
Reference:
format string Attack
In fact, this is a function call less parameters of the low-level error, but the compiler has a reasonable explanation without error.
Do not rely on editors, compilers. Basic skills should be solid. Write programs to concentrate.