| 1 |
Description: XS boot workaround |
| 2 |
XS auto-generated C code results in a segfault on i386 Debian when |
| 3 |
doing "#undef PERL_VERSION", so Marpa::R2 cannot be loaded. Instead |
| 4 |
doing #define PERL_VERSION 0 circumvents this. |
| 5 |
Author: Michael Banck <[email protected]> |
| 6 |
Last-Update: 2014-11-22 |
| 7 |
License: Same as Marpa::R2 code |
| 8 |
|
| 9 |
--- a/xs/R2.xs |
| 10 |
+++ b/xs/R2.xs |
| 11 |
@@ -7088,6 +7088,19 @@ |
| 12 |
INCLUDE: general_pattern.xsh |
| 13 |
|
| 14 |
BOOT: |
| 15 |
+ /* XS generates this code for boot: |
| 16 |
+ * |
| 17 |
+ *|#if (PERL_REVISION == 5 && PERL_VERSION >= 9) |
| 18 |
+ *| if (PL_unitcheckav) |
| 19 |
+ *| call_list(PL_scopestack_ix, PL_unitcheckav); |
| 20 |
+ *|#endif |
| 21 |
+ * |
| 22 |
+ * On i386 Debian, this results in a segfault, so Marpa::R2 |
| 23 |
+ * cannot be loaded. Setting PERL_VERSION to 0 circumvents |
| 24 |
+ * running call_list(). |
| 25 |
+ */ |
| 26 |
+#undef PERL_VERSION |
| 27 |
+#define PERL_VERSION 0 |
| 28 |
marpa_debug_handler_set(marpa_r2_warn); |
| 29 |
|
| 30 |
/* vim: set expandtab shiftwidth=2: */ |