New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter::Simple is confused by two divisions #20489
Comments
Here is what I get when I append more division operations to the statement. 3 divisions
4 divisions
|
The problem seems to be restricted to the
|
Do you have a URL for that bug report? |
Thanks for confirming and exploring further cases. Regards. |
On Tue, Nov 08, 2022 at 06:49:39AM -0800, James E Keenan wrote:
>
> Someone found the following bug while running PDL::NiceSlice. Here is a simplified version.
>
Do you have a URL for that bug report?
Yes: The first report is in
https://sourceforge.net/p/pdl/mailman/message/37729849/
You can follow the thread in
https://sourceforge.net/p/pdl/mailman/pdl-general/
Regards,
Luis
…
--
Reply to this email directly or view it on GitHub:
#20489 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
--
o
W. Luis Mochán, | tel:(52)(777)329-1734 /<(*)
Instituto de Ciencias Físicas, UNAM | fax:(52)(777)317-5388 `>/ /\
Av. Universidad s/n CP 62210 | (*)/\/ \
Cuernavaca, Morelos, México | ***@***.*** /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16 C2DF 5F0A C52B 791E B9EB
|
For me, the
From what I can tell, Filter::Simple is treating the
You can confirm that by adding as regex callback:
The
This doesn't appear to be a new issue, I see it as far back as 5.10 (after lowering the
I see the same output with 5.34, which the author in the original thread upgraded from. The only way to fix that I can see is to make Filter::Simple a full parser rather than the "guess and hope" current implementation. |
To: perl5-porters@perl.org
Subject: Filter::Simple is confused by two divisions
Message-Id: 5.36.0_128371_1667697003@yapaque.fis.unam.mx
Reply-To: mochan@fis.unam.mx
Cc: mochan@yapaque.fis.unam.mx
From: mochan@fis.unam.mx
This is a bug report for perl from mochan@fis.unam.mx,
generated with the help of perlbug 1.42 running under perl 5.36.0.
[Please describe your issue here]
Someone found the following bug while running PDL::NiceSlice. Here is
a simplified version.
Consider a trivial sourcefilter MyFilter.pm that does nothing but
report its input after removing comments and after putting them back
Now I use the filter in the following program:
When I run it I get the following output
The code fragment '/2/' is erroneously removed from the code before being fed to
the filter. However, if I change the name of the variable to something
else, as $y, there is no error. But if I change it to something ending
in x, as in $yx, the error reappears. Whatever is between the two
slashes is irrelevant. The second could be a in a comment in another
line and the error remains, as in
Output:
Best regards,
Luis
[Please do not change anything below this line]
Flags:
category=library
severity=medium
module=Filter::Simple
Site configuration information for perl 5.36.0:
Configured by mochan at Mon Jun 13 13:52:52 CDT 2022.
Summary of my perl5 (revision 5 version 36 subversion 0) configuration:
Platform:
osname=linux
osvers=5.17.0-1-amd64
archname=x86_64-linux
uname='linux yapaque 5.17.0-1-amd64 #1 smp preempt debian 5.17.3-1 (2022-04-18) x86_64 gnulinux '
config_args='-de -Dprefix=/home/mochan/perl5/perlbrew/perls/perl-5.36.0 -Aeval:scriptdir=/home/mochan/perl5/perlbrew/perls/perl-5.36.0/bin'
hint=recommended
useposix=true
d_sigaction=define
useithreads=undef
usemultiplicity=undef
use64bitint=define
use64bitall=define
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
Compiler:
cc='cc'
ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
optimize='-O2'
cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
ccversion=''
gccversion='11.3.0'
gccosandvers=''
intsize=4
longsize=8
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=3
ivtype='long'
ivsize=8
nvtype='double'
nvsize=8
Off_t='off_t'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries:
ld='cc'
ldflags =' -fstack-protector-strong -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib
libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
libc=libc-2.33.so
so=so
useshrplib=false
libperl=libperl.a
gnulibc_version='2.33'
Dynamic Linking:
dlsrc=dl_dlopen.xs
dlext=so
d_dlsymun=undef
ccdlflags='-Wl,-E'
cccdlflags='-fPIC'
lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'
@inc for perl 5.36.0:
/home/mochan/perl5/perlbrew/perls/perl-5.36.0/lib/site_perl/5.36.0/x86_64-linux
/home/mochan/perl5/perlbrew/perls/perl-5.36.0/lib/site_perl/5.36.0
/home/mochan/perl5/perlbrew/perls/perl-5.36.0/lib/5.36.0/x86_64-linux
/home/mochan/perl5/perlbrew/perls/perl-5.36.0/lib/5.36.0
Environment for perl 5.36.0:
HOME=/home/mochan
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/mochan/bin:/home/mochan/.cargo/bin:/home/mochan/gems/bin:/home/mochan/bin:/home/mochan/perl5/perlbrew/bin:/home/mochan/perl5/perlbrew/perls/perl-5.36.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin:/home/mochan/rakudo/rakudo-star-2020.01/install/bin:/home/mochan/rakudo/rakudo-star-2020.01/install/share/perl6/site/bin
PERLBREW_HOME=/home/mochan/.perlbrew
PERLBREW_MANPATH=/home/mochan/perl5/perlbrew/perls/perl-5.36.0/man
PERLBREW_PATH=/home/mochan/perl5/perlbrew/bin:/home/mochan/perl5/perlbrew/perls/perl-5.36.0/bin
PERLBREW_PERL=perl-5.36.0
PERLBREW_ROOT=/home/mochan/perl5/perlbrew
PERLBREW_SHELLRC_VERSION=0.86
PERLBREW_VERSION=0.86
PERL_BADLANG (unset)
PERL_CPANM_OPT=-M https://cpan.metacpan.org/
SHELL=/bin/bash
The text was updated successfully, but these errors were encountered: