Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the ExtUtils-ParseXS CPAN distribution.

Report information
The Basics
Id: 69536
Status: resolved
Priority: 0/
Queue: ExtUtils-ParseXS

People
Owner: Nobody in particular
Requestors: patcat88 [...] snet.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.2206
Fixed in: (no value)



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.
Hi, thanks for the report. That's an interesting one, though I never came across the problem myself. I agree that this should be caught by ParseXS. Unfortunately, it's unlikely I'll get a chance to come up with a patch soon (I'm moving). Do you think that maybe, you can give it a shot yourself? Just make sure to patch version 3.00_02 which is part of blead perl (and and CPAN as a dev release) and not 2.2206 that you reported against. Best regards, Steffen
I have a proof-of-concept change to ExtUtils::ParseXS that should do what you ask for. I'd appreciate some review: https://github.com/tsee/extutils- parsexs/commit/699baab8f8072c9b3237f70e236987babb0a15ca Please understand that this isn't going to be in the upcoming stable release since that is long overdue and needs to be rock-solid after very big changes.
The aforementioned change has been picked into the master branch of ExtUtils::ParseXS and will eventually make its way to CPAN and core perl. Best regards, Steffen