I've discovered a bug in SER 0.8.10 which can segfault the server with a dereference of NULL, one time in RAND_MAX.
In the function branch_builder() in msg_translator.c, if both the parameter 'label' and the parameter 'char_v' are 0, SER will crash. This is because the code assumes that if label is 0, char_v is non-NULL, and so will attempt to call memcpy() with char_v as the source.
When branch_builder is invoked by the tm module, however, the label parameter comes from a random value assigned by h_table.c. This value is generated by rand(). As such, its value can legitimately be 0, which will happen, on average, one time in RAND_MAX.
On Linux, RAND_MAX is 2^31, so this crash is very unlikely. However, on Solaris (where I'm doing some testing), RAND_MAX is 2^15, so this crash is reasonably common for a server under heavy load. However, this is a "valid" crash in either case; this isn't just a portability issue.
(Note that RAND_MAX == 2^15 being less than TABLE_ENTRIES == 2^16 can also cause problems, according to a comment in h_table.c, though I believe only ones of efficiency, not correctness.)
The patch below works around the problem in the simplest possible way, though it isn't a correct fix. I suspect the proper solution would be a) to reverse the logic of branch_builder() to test char_v for NULL, rather than label for non-0; and b) to check with the preprocessor if RAND_MAX is less than TABLE_ENTRIES, and if so, use random() rather than rand() in modules/tm/h_table.c.