Description: XS boot workaround XS auto-generated C code results in a segfault on i386 Debian when doing "#undef PERL_VERSION", so Marpa::R2 cannot be loaded. Instead doing #define PERL_VERSION 0 circumvents this. Author: Michael Banck Last-Update: 2014-11-22 License: Same as Marpa::R2 code --- a/xs/R2.xs +++ b/xs/R2.xs @@ -7088,6 +7088,19 @@ INCLUDE: general_pattern.xsh BOOT: + /* XS generates this code for boot: + * + *|#if (PERL_REVISION == 5 && PERL_VERSION >= 9) + *| if (PL_unitcheckav) + *| call_list(PL_scopestack_ix, PL_unitcheckav); + *|#endif + * + * On i386 Debian, this results in a segfault, so Marpa::R2 + * cannot be loaded. Setting PERL_VERSION to 0 circumvents + * running call_list(). + */ +#undef PERL_VERSION +#define PERL_VERSION 0 marpa_debug_handler_set(marpa_r2_warn); /* vim: set expandtab shiftwidth=2: */