http://www.perlmonks.org?node_id=11135387


in reply to perl built with -DDEBUGGING causes "failed to extend arg stack" error with XS modules

If both perl and the XS module are built with the same build options (in this case, -DDEBUGGING), then the error message you see is almost certainly a bug in the XS module. If perl is built with -DDEBUGGING while the XS module is built without it (which is the situation the ticket you linked to refers to) then you'll get spurious errors like these.

In general perl only works with XS modules built using the same perl and build options. That ticket was basically asking whether we could make a special exception for -DDEBUGGING, but in general it is exceedingly hard to maintain binary compatibility among different build options.

NB: I added the high-water-mark debugging code to the perl core.

Dave.