Skip Menu |

This queue is for tickets about the version CPAN distribution.

Report information
The Basics
Id: 70950
Status: resolved
Priority: 0/
Queue: version

People
Owner: jpeacock [...] cpan.org
Requestors: daniel.frett [...] ccci.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.94
Fixed in: (no value)



Subject: Segmentation fault when using certain assignment operators with version objects
this short code snippet causes a seg fault on perl 5.10.0, 5.10.1, and 5.12.4: use version; my $sum = 0; $sum += version->parse(v2.0.0);
On Tue Sep 13 22:35:50 2011, dfrett wrote: Show quoted text
> this short code snippet causes a seg fault on perl 5.10.0, 5.10.1, and > 5.12.4: > > use version; > my $sum = 0; > $sum += version->parse(v2.0.0);
While it definitely should not segfault, there is not now nor ever will be support for mathematical operations with version objects. Full stop.
From: daniel.frett [...] ccci.org
On Wed Sep 14 21:24:24 2011, JPEACOCK wrote: Show quoted text
> On Tue Sep 13 22:35:50 2011, dfrett wrote:
> > this short code snippet causes a seg fault on perl 5.10.0, 5.10.1, and > > 5.12.4: > > > > use version; > > my $sum = 0; > > $sum += version->parse(v2.0.0);
> > While it definitely should not segfault, there is not now nor ever will > be support for mathematical operations with version objects. Full stop.
this was from code I had written about 4 years ago that was using $class->VERSION and had already been factoring out, it was still referenced in one spot and triggered the seg fault when I upgraded version. I have fully gotten rid of that code now, but figured the seg fault should still be addressed :) -Daniel
I will explicitly forbid all overloaded math operations on version objects in 0.95...