Extension test_spi_in_preload_session just executes 'select 1' in its _PG_init() function.
Until Postgres version 14beta1 this works fine, but in version 14beta2 the process dies.

To compile:
make
make install

In postgresql.conf set:

log_min_messages = debug3
session_preload_libraries = 'test_spi_in_preload_session'

To test:
Just try to login to Postgres or execute
make installcheck
