When I execute a frozen MPY using pyexec_frozen_module() it runs fine as long as the module does not create any output. But as soon as there is a print() or a raise in the python code I get something like the following output followed by an immediate segfault:
I looked at the backtrace and the function in which the segfault happens is qstr_data() which is called by mp_obj_print_exception() via mp_vprintf() and mp_printf(). What seems strange to me is that qstr_data() is called with the parameter q=377. I had a look at my qstrdefs.generated.h and it contains 377 elements, so I guess this is where the problem lies but I don't have a clue where to look next to debug this and I hope someone has an idea.
Code: Select all
Traceback (most recent call last): File "q", line 1448734720