Skip Menu |
 

This queue is for tickets about the Math-BigInt-FastCalc CPAN distribution.

Report information
The Basics
Id: 35162
Status: resolved
Worked: 5 min
Priority: 0/
Queue: Math-BigInt-FastCalc

People
Owner: TELS [...] cpan.org
Requestors: ambrus [...] math.bme.hu
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.19
Fixed in: (no value)



CC: Richard <vzshzn [...] gmail.com>
MIME-Version: 1.0
In-Reply-To: <85cd6abe0804161352g3115a821wb26873eb4f5d2aa3 [...] mail.gmail.com>
X-Spam-Status: No, hits=-6.6 required=8.0 tests=BAYES_00,DK_SIGNED,PERLBUG_CONF,SPF_PASS
Content-Disposition: inline
References: <85cd6abe0804161352g3115a821wb26873eb4f5d2aa3 [...] mail.gmail.com>
content-type: text/plain; charset="utf-8"
Reply-To: ambrus [...] math.bme.hu
Received: from x1.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 3E8624D8146 for <bug-Math-BigInt-FastCalc [...] rt.cpan.org>; Thu, 17 Apr 2008 14:35:25 -0400 (EDT)
Received: (qmail 29738 invoked from network); 17 Apr 2008 18:35:24 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 17 Apr 2008 18:35:24 -0000
Received: from rv-out-0506.google.com (HELO rv-out-0506.google.com) (209.85.198.224) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 Apr 2008 11:35:19 -0700
Received: by rv-out-0506.google.com with SMTP id g37so84362rvb.33 for <bug-Math-BigInt-FastCalc [...] rt.cpan.org>; Thu, 17 Apr 2008 11:35:17 -0700 (PDT)
Received: by 10.140.207.2 with SMTP id e2mr1010632rvg.144.1208457317173; Thu, 17 Apr 2008 11:35:17 -0700 (PDT)
Received: by 10.141.116.2 with HTTP; Thu, 17 Apr 2008 11:35:17 -0700 (PDT)
Delivered-To: cpan-bug+Math-BigInt-FastCalc [...] diesel.bestpractical.com
Subject: Re: MBI segfault
Return-Path: <zsbana [...] gmail.com>
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=ekolkSNN+J4HTBzVML/ZBm6d82aWUCTrbjcvT7m3IkTilx6uAg7WjiKflMSbBHZBgc8hvKgCliidQ5xvCXVZ2c672tDp11t+hMfEuhqxIjqyhGtcTCHEkEKWSha4m0Jce4Yfv2lp1F6t0DYymPsUSz2QVZMealaEMcR+zAETBzY=
X-Original-To: bug-Math-BigInt-FastCalc [...] rt.cpan.org
X-Spam-Check-BY: 16.mx.develooper.com
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=UxEDQPfR9vS0GRMmp8NpsR8gDpCb43S4om5PyGoAvms=; b=llfhEYYNeEGzxuMlWeD1mgt8D1+sWI6vkurh27uzrFgBeDwHhXvzfy9B2izfU4NVjVLc87OKfjWJEr5r4vV+Bg6Ee0eUhMP0E5oxoQOThCQJFj4yPyyC2Y3wVQNLfxLMvausr76HW0fQS7ku9eMVnUXxV5n8Y8aDNxyr8yBb9wA=
X-Google-Sender-Auth: 382569995bc922b4
Date: Thu, 17 Apr 2008 20:35:17 +0200
Sender: zsbana [...] gmail.com
X-Spam-Level: *
Message-Id: <25d4951c0804171135s30e3ac19n9c42f4958e8a977c [...] mail.gmail.com>
To: bug-Math-BigInt-FastCalc [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: "Zsbán Ambrus" <ambrus [...] math.bme.hu>
X-RT-Original-Encoding: ISO-8859-1
Content-Length: 3950
Download (untitled) / with headers
text/plain 3.8k
Hi, The following command causes a segmentation fault on my perl 5.10.0 on i686 linux: perl -wE 'use Math::BigRat "lib", "FastCalc"; use Math::BigFloat "lib", "FastCalc"; say Math::BigFloat->as_number(Math::BigRat->new("10/7"));' This code is clearly wrong: the as_number method is called with parameters I shouldn't give to it. However, I believe it still shoudn't result in a segfault, but either die or give some result. This is especially true because FastCalc is now the default engine for MBI. At least two other people have confirmed that this command segfaults on their machine too. I couldn't reproduce the bug with perl 5.8.8. Zshzn has kindly volunteered to look in this segfault with a debugger. He says the following. On Wed, Apr 16, 2008 at 10:52 PM, Richard <vzshzn@gmail.com> wrote: Show quoted text
> Here's what I've found out about your > segfault: > > It happens in _copy of FastCalc.xs, which is called from BigFloat.pm's > as_number at about line 3642. > > as_number tries to _copy $x->{_m}, which is undef. I assume the undefness of > the situation causes the problem :p > > I would get more accurate info but by recompiling FastCalc the problem went > away. Maybe it has already been fixed, at least on one end.
Here are some details about my installation. [am]king ~/a/tmp$ perl -wE 'use Math::BigRat "lib", "FastCalc"; use Math::BigFloat "lib", "FastCalc"; say Math::BigFloat->as_number(Math::BigRat->new("10/7"));' Segmentation fault 139[am]king ~/a/tmp$ perl -V Summary of my perl5 (revision 5 version 10 subversion 0) configuration: Platform: osname=linux, osvers=2.6.20.6, archname=i686-linux uname='linux king 2.6.20.6 #3 smp tue may 29 09:42:52 cest 2007 i686 gnulinux ' config_args='' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='4.1.1', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib /usr/lib64 libs=-lnsl -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.3.6.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.3.6' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP USE_LARGE_FILES USE_PERLIO Built under linux Compiled at Dec 18 2007 19:48:06 @INC: /usr/local/lib/perl5/5.10.0/i686-linux /usr/local/lib/perl5/5.10.0 /usr/local/lib/perl5/site_perl/5.10.0/i686-linux /usr/local/lib/perl5/site_perl/5.10.0 /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl . [am]king ~/a/tmp$ perl -wE 'use Math::BigInt; say $Math::BigInt::VERSION;' # this is the version that comes with perl 5.10.0 1.88 [am]king ~/a/tmp$ perl -wE 'use Math::BigRat; say $Math::BigRat::VERSION;' # this one is updated though 0.22 [am]king ~/a/tmp$ perl -wE 'use Math::BigInt::FastCalc; say $Math::BigInt::FastCalc::VERSION;' 0.19 Incidentally, thanks for the new as_float method in Math::BigRat, it's just what I'd have needed for a program I wrote two months ago. Ambrus
MIME-Version: 1.0
X-Spam-Status: No, hits=-3.6 required=8.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW
In-Reply-To: <rt-3.6.HEAD-18279-1208457341-1420.35162-4-0 [...] rt.cpan.org>
References: <RT-Ticket-35162 [...] rt.cpan.org> <25d4951c0804171135s30e3ac19n9c42f4958e8a977c [...] mail.gmail.com> <rt-3.6.HEAD-18279-1208457341-1420.35162-4-0 [...] rt.cpan.org>
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
X-Pair-Authenticated: 84.63.65.228
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEUyTo9PgLt6dK1xgaOmqcl6wOuurOKkvs6+wN+v4ffY2/jb3enu7ffy+v77+f/9//zm1tSJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1wYNDzo0sYTGuwAAADx0RVh0Q29tbWVudAAoYykgYnkgVGVscyBibG9vZGdhdGUuY29tLiAyMDAzIEFsbCBSaWdodHMgUmVzZXJ2ZWQunDFKTgAAAb5JREFUOMvlk79u2zAQxrl0rwfvgV8hQ16Ag1cPGjS2AYQ8QIAUyBoEgvcMHrwbjDIHiNQ+gHXUXthH7YV0fAJSPdJ/4jbIAwS5QYDuR30k7/skhndKfHrgwsN09j/gvXUYy/4DHBHt+uhOAXlqOqKGGgvQngJLANRhp7eE1B4BL+2qugSoOiR6lfJhdVXGQuqPADf1L6hrmcvbxwYNC+yBrgDK8oeU8qZs+vb1HrWuWeNuKqe3Ohz8cBFRbp6rjbqTcvrEWyPZHXGiXM/VKue+KgAAjebtXcvgRSkGWXY5Oee6uM4L6MMIBKj8Psu+n4lQ45vrc5nPAbEVSvHy7Gwy+ToSowTNSir1qPmLoHSfTbKrbyMxTpb+z2quIEht4x5XuZrNxJd0aXCdFzpIGQRGav6UzMQ4Xfph+1LpwRkGuAVQBT4ks2SB7RAmPQy9INdiD+ui/52k6QIHw/0w4+CHM1Sy7kO6WKIntuwA2MG6ItwsfqKhWHYPiDoI80CM3ehWDAO/cb/SQcV6GyccgY8A2OPg/26+u1xFEK7Fods7cgCcK9NHw+k0iXxgbIjs2+xyBPkr/xZ4PIp/zJ/zL9K+/Fxg8Z/MAAAAAElFTkSuQmCC
Content-Type: multipart/signed; boundary="nextPart4726840.BYc2xCTGBS"; protocol="application/pgp-signature"; micalg=pgp-sha1
Received: from x1.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id A50F14D8121 for <bug-Math-BigInt-FastCalc [...] rt.cpan.org>; Thu, 17 Apr 2008 15:27:27 -0400 (EDT)
Received: (qmail 20100 invoked from network); 17 Apr 2008 19:27:26 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 17 Apr 2008 19:27:26 -0000
Received: from relay01.pair.com (HELO relay01.pair.com) (209.68.5.15) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with SMTP; Thu, 17 Apr 2008 12:27:23 -0700
Received: (qmail 76988 invoked by uid 0); 17 Apr 2008 19:27:18 -0000
Received: from unknown (HELO bloodgate.com) (unknown) by unknown with SMTP; 17 Apr 2008 19:27:18 -0000
Delivered-To: cpan-bug+Math-BigInt-FastCalc [...] diesel.bestpractical.com
User-Agent: KMail/1.9.6
Subject: Re: [rt.cpan.org #35162] Re: MBI segfault
Return-Path: <nospam-abuse [...] bloodgate.com>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-Math-BigInt-FastCalc [...] rt.cpan.org
Date: Thu, 17 Apr 2008 21:27:03 +0200
X-Spam-Level: *
Message-Id: <200804172127.10901 [...] bloodgate.com>
To: bug-Math-BigInt-FastCalc [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Tels <nospam-abuse [...] bloodgate.com>
RT-Message-ID: <rt-3.6.HEAD-18297-1208460481-429.35162-0-0 [...] rt.cpan.org>
Content-Length: 0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 2116
Hello, On Thursday 17 April 2008 20:35:42 ambrus@math.bme.hu via RT wrote: Show quoted text
> Thu Apr 17 14:35:40 2008: Request 35162 was acted upon. > Transaction: Ticket created by ambrus@math.bme.hu > Queue: Math-BigInt-FastCalc > Subject: Re: MBI segfault > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: ambrus@math.bme.hu > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=35162 > > > > Hi, > > The following command causes a segmentation fault on my perl 5.10.0 > on i686 linux: > > perl -wE 'use Math::BigRat "lib", "FastCalc"; use Math::BigFloat > "lib", "FastCalc"; say > Math::BigFloat->as_number(Math::BigRat->new("10/7"));'
[snip] It seems you use the BigInt from v5.10.0 and updated to the new FastCalc, so I will need a bit of time to track things down and check what actually happens. But it shouldn't segfault :) Thanx for the report! Show quoted text
> Incidentally, thanks for the new as_float method in Math::BigRat, > it's just what I'd have needed for a program I wrote two months ago.
Oh wow, coincidence, I just needed it for something and thought it might be useful. :) There are not many users of BigRat (or even BigFloat and BigInts) and I get basically zero feedback so I always add stuff when I think of it :) All the best, Tels -- Signed on Thu Apr 17 21:24:41 2008 with key 0x93B84C15. Get one of my photo posters: http://bloodgate.com/posters PGP key on http://bloodgate.com/tels.asc or per email. "I can confirm this experimentally. Inspired by this development, I implanted electrodes into a bowl of tomato soup. No amount of deep electrical stimulation could bring the soup into anything we could recognize as consciousness, nor was its ability to communicate improved. Possibly the failure of the deep electrical stimulation to elicit the desired response has something to do with the vegetative state of the tomatoes that were used to make the soup. With this in mind, I am going to be conducting further experiments using a crab bisque." -- Ohreally_factor (593551) on 2007-08-05 on /. (#20119773)
Content-Type: application/pgp-signature
Content-Length: 481
Download (untitled)
application/pgp-signature 481b

Message body not shown because it is not plain text.

MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,DK_SIGNED,SPF_PASS
In-Reply-To: <rt-3.6.HEAD-18297-1208460481-429.35162-6-0 [...] rt.cpan.org>
Content-Disposition: inline
References: <RT-Ticket-35162 [...] rt.cpan.org> <25d4951c0804171135s30e3ac19n9c42f4958e8a977c [...] mail.gmail.com> <rt-3.6.HEAD-18279-1208457341-1420.35162-4-0 [...] rt.cpan.org> <200804172127.10901 [...] bloodgate.com> <rt-3.6.HEAD-18297-1208460481-429.35162-6-0 [...] rt.cpan.org>
Reply-To: ambrus [...] math.bme.hu
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: ISO-8859-1
Received: from x1.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id BE4B04D8048 for <bug-Math-BigInt-FastCalc [...] rt.cpan.org>; Fri, 18 Apr 2008 02:18:18 -0400 (EDT)
Received: (qmail 12426 invoked from network); 18 Apr 2008 06:18:18 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 18 Apr 2008 06:18:18 -0000
Received: from wa-out-1112.google.com (HELO wa-out-1112.google.com) (209.85.146.177) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 Apr 2008 23:18:12 -0700
Received: by wa-out-1112.google.com with SMTP id m28so605739wag.13 for <bug-Math-BigInt-FastCalc [...] rt.cpan.org>; Thu, 17 Apr 2008 23:18:09 -0700 (PDT)
Received: by 10.140.136.6 with SMTP id j6mr1316473rvd.50.1208499489877; Thu, 17 Apr 2008 23:18:09 -0700 (PDT)
Received: by 10.141.116.2 with HTTP; Thu, 17 Apr 2008 23:18:09 -0700 (PDT)
Delivered-To: cpan-bug+Math-BigInt-FastCalc [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #35162] MBI segfault
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=qbktKJRy5Vb9QZR15Za87f1a8aZSFpBgQfph4j7Qb8jBHOSUWtd+ZTH9B2+++ahBtAOrtVGUdIrJAtIKdtR4jKrRTeG/luSJ3hkh/Ivympz8W8iIfXrgYo54ngtUZMn4xM+y/EvLiaRxhCRzZau4408tkOuVsjscLSunZzY3zX0=
Return-Path: <zsbana [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=ras0AH2OsvKN6IeIQj5ovAYACI1mWPIy09B1vTEts94=; b=WsGorxTw44KvzSbqAzuglKae1II49fEL0Mrd3RZIwqvR9xLX+asRZek2yeUuNIektTzGs9oojqhsmYCmLOoTZlS3WqX2UVSWhZUF/9dclYLWTK5sKASxhkWL7RuWKWGC3FNPpE8bK48hxjEUMUQWtkSNvl2q+WRGAuO1fhXDtZo=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-Math-BigInt-FastCalc [...] rt.cpan.org
X-Google-Sender-Auth: 4193adcd32cfaf90
Sender: zsbana [...] gmail.com
Date: Fri, 18 Apr 2008 08:18:09 +0200
X-Spam-Level: *
Message-Id: <25d4951c0804172318w52c35fffi358eb18b384bf5a2 [...] mail.gmail.com>
To: bug-Math-BigInt-FastCalc [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: "Zsbán Ambrus" <ambrus [...] math.bme.hu>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.6.HEAD-18317-1208499504-1274.35162-0-0 [...] rt.cpan.org>
Content-Length: 462
Download (untitled) / with headers
text/plain 462b
On Thu, Apr 17, 2008 at 9:28 PM, nospam-abuse@bloodgate.com via RT <bug-Math-BigInt-FastCalc@rt.cpan.org> wrote: Show quoted text
> It seems you use the BigInt from v5.10.0 and updated to the new > FastCalc, so I will need a bit of time to track things down and check > what actually happens. But it shouldn't segfault :)
That's what the cpan shell wants to do because the BigInt that comes with perl 5.10.0 has the same version number (1.88) as the new one on cpan. Ambrus
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.5 required=8.0 tests=BAYES_00,RDNS_NONE
In-Reply-To: <rt-3.6.HEAD-18317-1208499504-1274.35162-5-0 [...] rt.cpan.org>
References: <RT-Ticket-35162 [...] rt.cpan.org> <25d4951c0804172318w52c35fffi358eb18b384bf5a2 [...] mail.gmail.com> <rt-3.6.HEAD-18317-1208499504-1274.35162-5-0 [...] rt.cpan.org>
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
X-Pair-Authenticated: 84.63.36.87
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEUyTo9PgLt6dK1xgaOmqcl6wOuurOKkvs6+wN+v4ffY2/jb3enu7ffy+v77+f/9//zm1tSJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1wYNDzo0sYTGuwAAADx0RVh0Q29tbWVudAAoYykgYnkgVGVscyBibG9vZGdhdGUuY29tLiAyMDAzIEFsbCBSaWdodHMgUmVzZXJ2ZWQunDFKTgAAAb5JREFUOMvlk79u2zAQxrl0rwfvgV8hQ16Ag1cPGjS2AYQ8QIAUyBoEgvcMHrwbjDIHiNQ+gHXUXthH7YV0fAJSPdJ/4jbIAwS5QYDuR30k7/skhndKfHrgwsN09j/gvXUYy/4DHBHt+uhOAXlqOqKGGgvQngJLANRhp7eE1B4BL+2qugSoOiR6lfJhdVXGQuqPADf1L6hrmcvbxwYNC+yBrgDK8oeU8qZs+vb1HrWuWeNuKqe3Ohz8cBFRbp6rjbqTcvrEWyPZHXGiXM/VKue+KgAAjebtXcvgRSkGWXY5Oee6uM4L6MMIBKj8Psu+n4lQ45vrc5nPAbEVSvHy7Gwy+ToSowTNSir1qPmLoHSfTbKrbyMxTpb+z2quIEht4x5XuZrNxJd0aXCdFzpIGQRGav6UzMQ4Xfph+1LpwRkGuAVQBT4ks2SB7RAmPQy9INdiD+ui/52k6QIHw/0w4+CHM1Sy7kO6WKIntuwA2MG6ItwsfqKhWHYPiDoI80CM3ehWDAO/cb/SQcV6GyccgY8A2OPg/26+u1xFEK7Fods7cgCcK9NHw+k0iXxgbIjs2+xyBPkr/xZ4PIp/zJ/zL9K+/Fxg8Z/MAAAAAElFTkSuQmCC
Content-Type: multipart/signed; boundary="nextPart1294696.8HA89xYucs"; protocol="application/pgp-signature"; micalg=pgp-sha1
Received: from x1.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 9ABFD4D8078 for <bug-Math-BigInt-FastCalc [...] rt.cpan.org>; Fri, 18 Apr 2008 12:32:59 -0400 (EDT)
Received: (qmail 5093 invoked from network); 18 Apr 2008 16:32:53 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 18 Apr 2008 16:32:53 -0000
Received: from Unknown (HELO relay02.pair.com) (209.68.5.16) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with SMTP; Fri, 18 Apr 2008 09:31:35 -0700
Received: (qmail 29107 invoked by uid 0); 18 Apr 2008 16:29:41 -0000
Received: from unknown (HELO bloodgate.com) (unknown) by unknown with SMTP; 18 Apr 2008 16:29:41 -0000
Delivered-To: cpan-bug+Math-BigInt-FastCalc [...] diesel.bestpractical.com
User-Agent: KMail/1.9.6
Subject: Re: [rt.cpan.org #35162] MBI segfault
Return-Path: <nospam-abuse [...] bloodgate.com>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-Math-BigInt-FastCalc [...] rt.cpan.org
Date: Fri, 18 Apr 2008 18:27:05 +0200
X-Spam-Level: *
Message-Id: <200804181827.12375 [...] bloodgate.com>
To: bug-Math-BigInt-FastCalc [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Tels <nospam-abuse [...] bloodgate.com>
RT-Message-ID: <rt-3.6.HEAD-18279-1208536395-1775.35162-0-0 [...] rt.cpan.org>
Content-Length: 0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 1007
Download (untitled) / with headers
text/plain 1007b
On Friday 18 April 2008 08:18:26 ambrus@math.bme.hu via RT wrote: Show quoted text
> Queue: Math-BigInt-FastCalc > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=35162 > > > On Thu, Apr 17, 2008 at 9:28 PM, nospam-abuse@bloodgate.com via RT > > <bug-Math-BigInt-FastCalc@rt.cpan.org> wrote:
> > It seems you use the BigInt from v5.10.0 and updated to the new > > FastCalc, so I will need a bit of time to track things down and > > check what actually happens. But it shouldn't segfault :)
> > That's what the cpan shell wants to do because the BigInt that comes > with perl 5.10.0 has the same version number (1.88) as the new one on > cpan.
It shouldn't really matter as both versions should be indeed identical in code. All the best, Tels -- Signed on Fri Apr 18 18:26:36 2008 with key 0x93B84C15. Get one of my photo posters: http://bloodgate.com/posters PGP key on http://bloodgate.com/tels.asc or per email. "My name is Felicity Shagwell. Shagwell by name, shag very well by reputation."
Content-Type: application/pgp-signature
Content-Length: 481
Download (untitled)
application/pgp-signature 481b

Message body not shown because it is not plain text.

MIME-Version: 1.0
In-Reply-To: <25d4951c0804171135s30e3ac19n9c42f4958e8a977c [...] mail.gmail.com>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Charset: utf8
References: <85cd6abe0804161352g3115a821wb26873eb4f5d2aa3 [...] mail.gmail.com> <25d4951c0804171135s30e3ac19n9c42f4958e8a977c [...] mail.gmail.com>
Message-Id: <rt-3.6.HEAD-18297-1208686509-1154.35162-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 1055
After looking into this issue, I noted that simple Math::BigFloat cannot handle being passed a Math::BigRat object. Of course I can have a look and find out why Math::BigInt::FastCalc segfaults, but I don't think I can do much sensible things in its codebase - after all, calling it with the wrong parameters won't ever get a correct result :) And since adding all the checks for wrong parameters (just to catch wrong calling styles in code above) would slow everything down, I fixed Math::BigFloat instead by doing the right thing when getting a non-Math::BigFloat object (which a BigRat is): # perl -Ilib -wle 'use Math::BigRat "lib", "FastCalc"; use Math::BigFloat "lib", "FastCalc"; print Math::BigFloat->as_number(Math::BigRat->new("120/7"));' 17 The fix will be in Math::BigInt v1.89. To force people to upgrade, I will also add a requirement for v1.89 in Math::BigInt::FastCalc v0.20 when I release it. If this doesn't solve your issue, or you have any comments, please reply to this bug report to re-open it. Thank you for your report! Tels


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.