This queue is for tickets about the Text-CSV_XS CPAN distribution.

Report information
The Basics
Id:
37529
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
HMBRAND [...] cpan.org
Requestors:
lubo.rintel [...] gooddata.com
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
0.30
Fixed in:
0.53



The problem described below can be triggered with perl 5.10 on x86_64 architecture. I don't have a minimal reproducer, but am able to reproduce it with a fairly complex and seemingly unrelated activity preceeding instantialization and calling parse(). I'd appreciate if you contacted me privately by e-mail in case the patch below does not seem correct to you, or I did not describe the problem well enough and you need to be able to reproduce the problem. See http://netbsd.sk/~lkundrak/perl-Text-CSV_XS-0.52-svupgrade.patch Under some circumstances, newSVpv() returns SV of higher type than SVt_PVIV, such as SVt_PVMG. Lubomir Rintel <lkundrak@v3.sk> diff -urp Text-CSV_XS-0.52.orig/CSV_XS.xs Text-CSV_XS-0.52/CSV_XS.xs --- Text-CSV_XS-0.52.orig/CSV_XS.xs 2008-06-17 12:20:00.000000000 +0200 +++ Text-CSV_XS-0.52/CSV_XS.xs 2008-07-08 14:42:33.000000000 +0200 @@ -181,7 +181,7 @@ static SV *SetDiag (csv_t *csv, int xse) while (xs_errors[i].xs_errno && xs_errors[i].xs_errno != xse) i++; if ((err = newSVpv (xs_errors[i].xs_errstr, 0))) { - sv_upgrade (err, SVt_PVIV); + SvUPGRADE (err, SVt_PVIV); SvIV_set (err, xse); SvIOK_on (err); hv_store (csv->self, "_ERROR_DIAG", 11, err, 0);
Subject: Re: [rt.cpan.org #37529] SvUPGRADE is a safer choice than sv_upgrade
Date: Tue, 8 Jul 2008 16:57:52 +0200
To: bug-Text-CSV_XS@rt.cpan.org
From: "H.Merijn Brand" <h.m.brand@xs4all.nl>
On Tue, 08 Jul 2008 09:51:28 -0400, "Lubomir Rintel via RT" <bug-Text-CSV_XS@rt.cpan.org> wrote:
Show quoted text
> The problem described below can be triggered with perl 5.10 on x86_64 > architecture. I don't have a minimal reproducer, but am able to > reproduce it with a fairly complex and seemingly unrelated activity > preceeding instantialization and calling parse (). > > I'd appreciate if you contacted me privately by e-mail in case the patch > below does not seem correct to you, or I did not describe the problem > well enough and you need to be able to reproduce the problem.
No need for private contact. Sane patch applied. http://repo.or.cz/w/Text-CSV_XS.git?a=snapshot;sf=tgz
Show quoted text
> See http://netbsd.sk/~lkundrak/perl-Text-CSV_XS-0.52-svupgrade.patch > > Under some circumstances, newSVpv () returns SV of higher type than > SVt_PVIV, such as SVt_PVMG.
-- H.Merijn Brand Amsterdam Perl Mongers http://amsterdam.pm.org/ using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00, 11.11, 11.23, and 11.31, SuSE 10.1, 10.2, and 10.3, AIX 5.2, and Cygwin. http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

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