I have made this small illustrative code that exhibits the same issues the program I\'m writing does: namely, it works fine in debug mode, segfaults in release. The problem