Add support for training and 2 segfault fixes

> If you think it is useful, yes. But we have to make clear that assertions should not fail and that code that produces failed assertions should not be included before being fixed. Otherwise, we will end up with logs full of useless failed assertions.

Yeah, I was thinking about the philosophy of their use as well.

> Well, it's always interesting to have another coder's point of view since there might be some cases I've not thought about or even better ways to achieve the same goal that I don't know :)

Eh. :) there is the usual macro vs compiled code question, but here it is not worth the case, IMHO, and I'm sure you've already spoken of such things before with other ones, e.g.:
http://stackoverflow.com/questions/1137575/inline-functions-vs-preprocessor-macros