remove useless maybe_free() macro
fix overflow in stack.h
improve mock enum printing