[ID 19991117.002] a bug in perl5 under Linux

I find this problem when I use perl5 compiled under Linux.

% perl -v

This is perl, version 5.005_03 built for i386-linux

% perl
print 8473018401 % 524288 , "\n"
524287

The correct answer should be 33.


 Guoheng Wei                  _.-.        
 Sr. Component Design Eng.  '( ^{_}    (  
 Intel Corp.                  `~\`-----'\ 
 512-314-0053                    )_)---)_)  



0
guoheng
11/17/1999 5:45:30 PM
perl.perl5.porters 47706 articles. 1 followers. Follow

6 Replies
239 Views

Similar Articles

[PageSpeed] 6

>I find this problem when I use perl5 compiled under Linux.

>% perl -v

>This is perl, version 5.005_03 built for i386-linux

>% perl
>print 8473018401 % 524288 , "\n"
>524287

>The correct answer should be 33.

% perl -v
This is perl, version 5.005_62 built for i686-linux
[etc]

% perl
print 8473018401 % 524288 , "\n"
33

--tom
0
tchrist
11/17/1999 5:48:17 PM
> % perl -v
> This is perl, version 5.005_62 built for i686-linux
> [etc]
> 
> % perl
> print 8473018401 % 524288 , "\n"
> 33

$ perl -v
This is perl, version 5.005_03 built for sun4-solaris
[etc]

$ perl
print 8473018401 % 524288 , "\n"
524287

Hmm.

Alan Burlison
0
Alan
11/17/1999 7:04:14 PM
Alan Burlison writes:
> > % perl
> > print 8473018401 % 524288 , "\n"
> > 33

> $ perl
> print 8473018401 % 524288 , "\n"
> 524287
> 
> Hmm.

Well, you see: (unintentionally) insulting you is not my only function
on p5p.

Ilya
0
ilya
11/17/1999 7:59:11 PM
Ilya Zakharevich wrote:

> Well, you see: (unintentionally) insulting you is not my only function
> on p5p.

And the other function is?

;-)

Alan Burlison
0
Alan
11/17/1999 8:44:31 PM
In <v03110704b4598751194b@[212.24.192.242]>, Dominic Dunlop writes:
:At 20:59 +0100 1999-11-17, Ilya Zakharevich wrote:
:> Alan Burlison writes:
:> > > % perl
:> > > print 8473018401 % 524288 , "\n"
:> > > 33
:>
:> > $ perl
:> > print 8473018401 % 524288 , "\n"
:> > 524287
:> >
:> > Hmm.
:>
:> Well, you see: (unintentionally) insulting you is not my only function
:> on p5p.
:
:Fine, fine, but does anybody have any idea when and how the problem was
:fixed, and whether the fix has yet been/can be applied in the maintenance
:track?  A grep through _62 Changes for % and modulo sheds no light.  All
:I've established is that the fix was in place by _57, the earliest
:development version I have around.

For what it's worth:

crypt% setperl 57
old: perl5.005_03; new: perl5.005_57
crypt% perl -wle 'print 8473018401 % 524288'
33
crypt% setperl 56
old: perl5.005_57; new: perl5.005_56
crypt% perl -wle 'print 8473018401 % 524288'
524287
crypt% 

... so it was presumably fixed for the first time in _57.

Hugo
0
hv
11/18/1999 12:08:13 PM
On Thu, 18 Nov 1999 11:41:09 +0100, Dominic Dunlop wrote:
>Fine, fine, but does anybody have any idea when and how the problem was
>fixed, and whether the fix has yet been/can be applied in the maintenance
>track?  A grep through _62 Changes for % and modulo sheds no light.

    % grep ' % ' Changes | grep mod
                 Subject: [PATCH 5.005_*] Make % use fmod()


Sarathy
gsar@ActiveState.com
0
gsar
11/18/1999 7:15:15 PM
Reply:

Similar Artilces:

[ID 19991005.002] bug with die under linux
Hi, It looks there's a bug with die under linux. It can be evidenced with the following code: ============================================================================= #!/usr/bin/perl # save STDERR and redirect to /dev/null open OLDSTDERR, ">&STDERR" or die "STDERR dup failed: $!"; close STDERR; open STDERR, ">/dev/null" or die "STDERR redirect failed: $!"; # restore previous state close STDERR; open STDERR, ">&OLDSTDERR" or die "STDERR restoration failed: $!"; close OLDSTDERR; pri...

[ID 20001107.006] Problems installing perl5.6.0, perl5.00405 on AIX
Hiya. I'm attempting to install both Perl 5.6 and/or Perl 5.4.5 on an AIX box running AIX 4.1.2. They both compile with no problems: they fail a few tests, but those still result in 99% functionality. What blows up is the install. Perl 5.4.5 reports an out of memory error upon installation, like so: root@appf ***** /netadmin/temp/perl5.004_05 28 % ./perl installperl -n cp perl /usr/local/bin/perl5.00405 chmod 755 /usr/local/bin/perl5.00405 Out of memory! ('top' shows 1400MB free virtual memory, 124MB free real memory, etc.)...

[ID 20000229.001] perl5.005.03 bug
------=_NextPart_000_001E_01BF82BF.95F52A60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have tried to install Perl on Solaris2.6 Perl was downloaded from ftp.gnu.org The default options were selected during Configure. Error occured during make I am root using bourne shell and using /usr/ccs/bin/make=20 # # whoami =20 root # pwd /usr/local/gnuperl/perl-5.005.03 # ulimit -a time(seconds) unlimited file(blocks) unlimited data(kbytes) 2097148 stack(kbytes) 8192 coredump(blocks) unlimited nofiles(descriptors) 512 ...

[PATCH perl5.005_03] low hanging fruit. bring perl5.005_03 up to compiling on a modern linux system
--6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline The attached patch is just a quick fix to modernize the 5.00503 distribution to build on newer distributions of linux (my test system is debian/unstable on an x86) It's just two parts. 1) Teach makedepend about ggc3's extra output that needs stripping (stolen from bleadperls makedepend.SH) 2) Sync DB_File with the 1.806 from CPAN. I hope it's useful towards a 5.005_04 release. -- Richard Clamp <richardc@unixbeard.net> --6TrnltStXW4iwmi0 Content-Type: text/pla...

[ID 20010410.009] Bug installation Perl5 (Solaris 7)
------_=_NextPart_000_01C0C1DD.FD300610 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <<configure.txt>>=20 Help me please! Henrique Carvalho henrique.carvalho@tjdf.gov.br Analista de Suporte Tribunal de Justi=E7a do Distrito Federal - TJDF ------_=_NextPart_000_01C0C1DD.FD300610 Content-Type: text/plain; name="configure.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="configure.txt" =20 Beginning of configuration questions for perl5. ...

BUG: "sub PKG::my_method" confuses caller() [perl5.8.0 and perl5.6.0]
Hello friends, i found a fishy behaviour of caller(). It <wrongly> discrimites=20 { package Perl; sub rules { } } from=20 sub Perl::rules { } EXAMPLE=20 The code below produces this output: Under perl5.8.0: Correct, bugsim.pl, 12 main, bugsim.pl, 18 Under perl5.6.0: Correct, C:\temp\MuratToolsCD\programming\perl\perl-5.8.0\bugsim.pl, 12 main, C:\temp\MuratToolsCD\programming\perl\perl-5.8.0\bugsim.pl, 18 #!/usr/bin/perl sub info { print join( ', ', caller ), "\n"; } { package Correct; sub mymethod { ::info...

[ID 19991116.002] perl5.005_02: my_setenv() and Term::ReadLine::Gnu
Hi! I've had a problem with perl5.005_02 and Term::ReadLine::Gnu dumping core on a solaris 5.5.1 box. A little bit of debugging revealed that readline-4.0 calls putenv(3) for LINES and COLUMNS during initialization. If these vars weren't present in the environment the call to putenv() changes the value of char **environ. my_setenv() tests this value to decide wether to copy the environment. In my case it didn't copy and thus dumped core on Safefree() as result of an assignment to $ENV{PATH}. Patch appended. Kind regards, Joerg -- Gaertner Datensysteme ...

[ID 19991113.002] Fwd: Problem while installing perl5 on HPUX 10.2
--0-1804289383-942492322=:4000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi folks, Resending, since there was no response .. i'd really appreciate ur help. thanks achal Note: forwarded message attached. ===== __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com --0-1804289383-942492322=:4000 Content-Type: message/rfc822 X-Apparently-To: achalt@yahoo.com via web1206.mail.yahoo.com Return-Path: <dbi-users-bounce@isc.org> X-Track: 1: 40 Received: from ib.rc.vix.com ...

[ID 20010728.007] bug in perl5.6 regular expressions on solaris sun4
This is a bug report for perl from ravi@cshl.org, generated with the help of perlbug 1.20 running under perl 5.00404. ��va;perlbug.tar�[m�G��ם_Q������6�ƹH�L���� �55-z�g��1����_��<Q�=�1�uLwUVfdd�Gd�e;�<[v{�}�k�x�Ν;�{�`�D߷�ۯ�������r�pxr�����Dʯ墯�e�y�b�K����Vqt�E~X$?�u)��/��I�ۿ�?������ttxt����~�w��|pL^s�?�N9��R�1d����X>˕�:<�~�O�>eD�x�1�UZc����@Y[(o `�u}�5��5�m�}�t]m����5M��}�ۛ�<��Fg��u�7h�B�{�@֧) 0�:���2 �7�A���@֘7���������b��x�v徱�����å�6���Xf�b�7�~����ճ�i= �0z�]A����i��`��k�l�'�oB߼'�aT���m��e������X�-��ں7�...

[ID 20010122.153] [Fwd: bug whith perl5.6 on tru64 unix]
--------------19842CB0D01E60DAB79ECFC5 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: bug whith perl5.6 on tru64 unix Date: Mon, 22 Jan 2001 18:08:15 +0100 From: Sa�d El Mamouni <said.elmamouni@math.univ-nantes.fr> To: richard@perl.org Dear I've installed perl 5.6 on my dec Alpha Server under digital unix tru64 4.0F to use the Sympa software and when i execute it it tells me : Your vendor has not defined the Sys::Syslog macro _PATH_LOG at /usr/local/lib/perl5/5.6....

Re: [ID 19991116.002] perl5.005_02: my_setenv() and Term::ReadLine::Gnu
Nick Ing-Simmons <nik@tiuk.ti.com> wrote > Thus as far as I can see unless we keep a hash of "things we malloc'ed" > and check for match we should not free() anything in environ. Exactly. And therefore, since we don't want memory leaks, we must keep a hash. What would happen about changes to %ENV from XS code? Or would the magic just "do the right thing"? Mike Guy On Fri, 19 Nov 1999, M.J.T. Guy wrote: > Nick Ing-Simmons <nik@tiuk.ti.com> wrote > > Thus as far as I can see unless we keep a hash of "things we...

[ID 20020326.002] coredump perl5.7.3 with GD modules on OpenBSD
This is a bug report for perl from alian@cpan.org, generated with the help of perlbug 1.33 running under perl v5.7.3. ----------------------------------------------------------------- First module I found that give coredump. Here list of successful build: http://testers.cpan.org/search?distname=all_distributions&macids=176 I've test GD1.29 => Last version same problem I've test with gcc-3.0.4 and gcc-2.95.3 same problem bash-2.05$ pwd /usr/local/workplace/perl/GD-1.29 bash-2.05$ make test PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -e 'use Test...

Perl5
is 5 years old today is we use the official date in the perlhist pod. I'm not sure if this should be multiplied or calculated in dog years. :) Happy birthday Perl. e. Elaine -HFB- Ashton writes: > is 5 years old today is we use the official date in the perlhist pod. I'm > not sure if this should be multiplied or calculated in dog years. :) Camel years, you mean? -- $jhi++; # http://www.iki.fi/jhi/ # There is this special biologist word we use for 'stable'. # It is 'dead'. -- Jack Cohen >is 5 years old today is we use t...

[ID 19991013.002] fix for 'perlop.pod' shipped with perl5.00503
Hello! Here is a small fix for perlop.pod. Thank you for your work, guys. Best regards, -Vlad --- perlop.pod-old Sat May 1 03:43:23 1999 +++ perlop.pod Sat May 1 04:25:04 1999 @@ -168,7 +168,7 @@ right argument is an expression rather than a search pattern, substitution, or transliteration, it is interpreted as a search pattern at run time. This can be is less efficient than an explicit search, because the -pattern must be compiled every time the expression is evaluated. +pattern must be compiled every time the expression is evaluated). Binary "!~&qu...

Web resources about - [ID 19991117.002] a bug in perl5 under Linux - perl.perl5.porters

Star Wars: The Force Awakens Budget Trailer
Limited budget but definitely brilliantly resourceful and had a lot of effort put in to it! 10/10 would watch a remake. Star Wars: The Force ...

'Affluenza' Teen's Mom Did Not Break Any Texas Laws: Lawyer
'Affluenza' Teen's Mom Did Not Break Any Texas Laws: Lawyer

Ben Carson’s Key Staff Quits
The Washington Post Reports that Ben Carson’s key staffers have quit today after conflict ensued within the Maryland neurosurgeon’s campaign ...

In Reversal, Twitter to Let Politwoops Collect Politicians' Deleted Tweets
New York Times In Reversal, Twitter to Let Politwoops Collect Politicians' Deleted Tweets New York Times Politwoops will once again be able ...

Allegiant Air Flight Makes Emergency Landing in Tennessee
Allegiant Air flight makes emergency landing at Tennessee airport; no injuries

Why didn't high-priced/pseudoscientific "behavioral profiling" work in San Bernardino?
San Bernardino is ground zero for the bunkum industry that sells "behavioral detection" courses to law enforcement, the place where the most ...

BBC hit by widespread outages taking website and iPlayer offline - Technology - The Guardian
UK public broadcaster apologises as its internet services are taken down in what may have been a DDoS attack affecting its website, apps and ...

Iran: US sanctions for missile tests would be 'illegal'
Iran is condeming reported U.S. plans to sanction the country after two ballistic missile tests.

China Builds Second Aircraft Carrier As South China Sea Tensions Mount
China is building a second aircraft carrier as tensions over a maritime dispute in the East and South China Seas heats up. The new aircraft carrier ...

‘The Walking Dead’ Season 6: GCI Subscribers May Be Left High And Dry After Negotiations Fall Through ...
GCI subscribers could miss out on new episodes of AMC’s The Walking Dead if negotiations are not finalized by midnight on January 1, 2016. This ...

Resources last updated: 1/1/2016 1:10:45 AM