cstrftime
cstrftime copied to clipboard
Multiple concurrent executions causing SIGSEGV
Hello!
Recently, I've used your cstrftime function within a go project, in order to create timestamps for go-elasticsearch search queries, backed by fasthttp. Unfortunately, under heavy load, random segfaults are seen. It looks like, the function uses a somtimes unallocated or in general shared memory space, which is prone to memory corruption. That said, I've switched to go time.Format() which works fine and stable, even under multiple hundred executions per second.
You should probably warn potential users about the negative impact concurrent executions can have on their application. It was quite hard to debug the issue, even while using well known debuggers such as GDB. Random SIGSEGV was seen without any clear details available in stacktraces.