Hi everybody,
unfortunately, 1.18 brought in another obstacle on my way of using the Intel TBB allocators for the Linux dedicated server.
As already reported in http://feedback.arma3.com/view.php?id=18556 I managed to get LD_PRELOADing the Intel TBB allocators working with superb performance by inecting some machine code into the 1.16 arma3server binary.
Repeating the same with the memory addresses adjusted to the new 1.18 binary still resolves the segmentation fault, but another issue arises now.
After a while, arma3server with the Intel TBB allocators LD_PRELOADed prints
"Error context" + some garbage
on my console and "hangs".
After hours of debugging with gdb, I recognized that this happens due to the usage of some uninitialized memory obtained from malloc().
arma3server works "by luck" with glibc's malloc() implementation, but ceases to work with Intel TBB's implementation of malloc().
You can verify this by a simple method:
Before starting arma3server with nothing LD_PRELOADed (i.e. using plain glibc's malloc()), export the environment variable MALLOC_PERTURB_ to 192 (which is the binary complement of 0x3f, the ASCII code of a question mark).
This will fill every memory chunk returned by malloc() with question marks (c.f. man mallopt).
I attached the output of arma3server with $MALLOC_PERTURB_ set this way to this issue.
Note the line
error context + a bunch of question marks,
i.e. the "some garbage" mentioned above really turned into question marks.
This obviously is a different bug than the one in http://feedback.arma3.com/view.php?id=18556
However, they are closely related in that they both arise if one tries to LD_PRELOAD the Intel TBB allocators. It would be nice, if someone with the appropriate privileges could link them here. {F23892}