Subject: | no error with CODE and RETVAL, and no OUTPUT section |
ParseXS doesn't error out or fail, for the following function named
getone, perl stack corrupting, XSUB definition.
Show quoted text
______________________
void
DoSomething(num)
int num
CODE:
DoSomething(num);
unsigned long
getone()
CODE:
RETVAL = 1;
void
anotherFunc(ptr)
void * ptr
...
_____________________
getone() is missing an OUTPUT section, yet has a return type before the
prototype line. Why isnt this caught by xsubpp/ParseXS? I can't think of
a reason for a XSUB, with a CODE section (not PPCODE or body-less XSUBs)
and a non void RETVAL return type, to not have an OUTPUT with RETVAL.
This programing error in XS is too common. Causes unexplainable perl
stack corruption/leaks that takes ages to trace back to the missing
OUTPUT section.