Skip Menu |
 

This queue is for tickets about the Scalar-List-Utils CPAN distribution.

Report information
The Basics
Id: 105476
Status: open
Priority: 0/
Queue: Scalar-List-Utils

People
Owner: Nobody in particular
Requestors: JHI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.42
Fixed in: (no value)

Attachments
0001-assert-cv-before-CvISXSUB-cv.patch



Subject: Coverity finding: potential null cv derefs with MULTICALL
Download (untitled) / with headers
text/plain 744b
Three of them: ListUtil.xs. ... 623 #ifdef dMULTICALL CID 118702 (#1 of 1): Dereference null return value (NULL_RETURNS) 20. dereference: Dereferencing a null pointer cv. 624 if(!CvISXSUB(cv)) { ... 706 #ifdef dMULTICALL CID 118703 (#1 of 1): Dereference null return value (NULL_RETURNS) 20. dereference: Dereferencing a null pointer cv. 707 if(!CvISXSUB(cv)) ... 795 #if defined(dMULTICALL) && (PERL_BCDVERSION > 0x5010000 || PERL_BCDVERSION < 0x5008009) CID 118704 (#1 of 1): Dereference null return value (NULL_RETURNS) 20. dereference: Dereferencing a null pointer cv. 796 if(!CvISXSUB(cv)) { The usual trick to silence Coverity is to add assert(foo) before each potential deref, that way it believes we care.
Ping.
Subject: [PATCH] Coverity finding: potential null cv derefs with MULTICALL
On Wed Feb 03 16:17:30 2016, JHI wrote: Show quoted text
> Ping.
Subject: 0001-assert-cv-before-CvISXSUB-cv.patch
From afca80d8e844b800435a2e748f3dce8e6e0d38c5 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi <jhi@iki.fi> Date: Fri, 5 Feb 2016 19:25:56 -0500 Subject: [PATCH] assert(cv) before CvISXSUB(cv). Coverity CID 118702, 118703, 118704. --- cpan/Scalar-List-Utils/ListUtil.xs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cpan/Scalar-List-Utils/ListUtil.xs b/cpan/Scalar-List-Utils/ListUtil.xs index 504c70e..c155e8e 100644 --- a/cpan/Scalar-List-Utils/ListUtil.xs +++ b/cpan/Scalar-List-Utils/ListUtil.xs @@ -323,6 +323,7 @@ CODE: GvSV(agv) = ret; SvSetMagicSV(ret, args[1]); #ifdef dMULTICALL + assert(cv); if(!CvISXSUB(cv)) { dMULTICALL; I32 gimme = G_SCALAR; @@ -377,6 +378,7 @@ CODE: SAVESPTR(GvSV(PL_defgv)); #ifdef dMULTICALL + assert(cv); if(!CvISXSUB(cv)) { dMULTICALL; I32 gimme = G_SCALAR; @@ -443,6 +445,7 @@ PPCODE: SAVESPTR(GvSV(PL_defgv)); #ifdef dMULTICALL + assert(cv); if(!CvISXSUB(cv)) { dMULTICALL; I32 gimme = G_SCALAR; @@ -621,6 +624,7 @@ PPCODE: SAVESPTR(GvSV(agv)); SAVESPTR(GvSV(bgv)); #ifdef dMULTICALL + assert(cv); if(!CvISXSUB(cv)) { /* Since MULTICALL is about to move it */ SV **stack = PL_stack_base + ax; @@ -704,6 +708,7 @@ PPCODE: SAVESPTR(GvSV(agv)); SAVESPTR(GvSV(bgv)); #ifdef dMULTICALL + assert(cv); if(!CvISXSUB(cv)) { /* Since MULTICALL is about to move it */ SV **stack = PL_stack_base + ax; @@ -793,6 +798,7 @@ PPCODE: * Skip it on those versions (RT#87857) */ #if defined(dMULTICALL) && (PERL_BCDVERSION > 0x5010000 || PERL_BCDVERSION < 0x5008009) + assert(cv); if(!CvISXSUB(cv)) { /* Since MULTICALL is about to move it */ SV **stack = PL_stack_base + ax; -- 2.7.0
Download (untitled) / with headers
text/plain 107b
On Fri Feb 05 19:28:42 2016, JHI wrote: Show quoted text
> On Wed Feb 03 16:17:30 2016, JHI wrote:
> > Ping.
>
Ping ping.
PING PING PING
Hello. seems good. -- Paul Evans


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.