I added some operations for my research in gcmodule in gc_collect_main()
that causes error during build:
[...]
Python/frozen_modules/site.h:site \
Python/frozen_modules/stat.h:stat \
Python/frozen_modules/importlib.util.h:importlib.util \
Python/frozen_modules/importlib.machinery.h:importlib.machinery \
Python/frozen_modules/runpy.h:runpy \
Python/frozen_modules/__hello__.h:__hello__ \
Python/frozen_modules/__phello__.h:__phello__ \
Python/frozen_modules/__phello__.ham.h:__phello__.ham \
Python/frozen_modules/__phello__.ham.eggs.h:__phello__.ham.eggs \
Python/frozen_modules/__phello__.spam.h:__phello__.spam \
Python/frozen_modules/frozen_only.h:frozen_only \
-o Python/deepfreeze/deepfreeze.c
gcc -c -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O0 -Wall -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Python/frozen.o Python/frozen.c
Segmentation fault (core dumped)
make: *** [Makefile:1409: Python/deepfreeze/deepfreeze.c] Error 139
What I added, when placed outside gc_collect_main()
, and called after a successful build has no problem (eg., from PyThread_start_new_thread()
). I’m positive that I did not mess up the internal gc module state, garbage list, or anything like that.
Here the problem is clearly from building frozen_modules
. But it’s hard to pinpoint purely based on this. Thus, I plan to remove the frozen_modules
building part from Makefile
, but there’re lots of places of frozen_modules
or freeze
. Is there a minimum effort for me to comment out something in Makefile to make it compile? Thank you!