Is it supposed to be possible to use Pike_error in PIKE_MODULE_INIT? When I do it I get a segfault upon exit when the failing module is freed.
No, it's not supported. PIKE_MODULE_{IN,EX}IT are called in a compiler context, so the proper way to report errors there is to use yyerror() et al.
I'm pretty sure it used to work though. There is a SET_ONERROR() /UNSET_ONERROR() pair around the call to (*(modfun)init)(), and f_load_module() itself can use Pike_error()...
I wouldn't call it a regression; start_new_program() et al have never liked errors being thrown, so it has most likely never worked (and isn't supposed to work).
As I said, it has worked, and it is supposed to work. I added the functionality in january 2002, and verified then that it worked.
pike-devel@lists.lysator.liu.se