Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.93k stars 552 forks source link

Here-document length bug #7717

Closed p5pRT closed 13 years ago

p5pRT commented 19 years ago

Migrated from rt.perl.org#33128 (status was 'resolved')

Searchable as RT33128$

p5pRT commented 19 years ago

From dmcallis@es.com

To​: perlbug@​perl.org Subject​: here-document bug Cc​: dmcallis@​es.com Reply-To​: dmcallis@​es.com Message-Id​: \5\.8\.0\_21696\_1103578388@​adev1

This is a bug report for perl from dmcallis@​es.com\, generated with the help of perlbug 1.34 running under perl v5.8.0.

I was using the "Here" document syntax to document the usage of a script. As I added functionality\, I would add to the here-document. As I added one trivial function\, my script started having parsing errors a few hundred lines away with a string that included ///"" (in order to result in /" when passed through a different application. I figured out a work-around\, but was puzzled. Then I added more functionality and found that the same thing occured again\, this time on a different line. I finally took the time to track it down to the here- document. I saved the here-document in a 33 line file and used wc to figure out that 1833 characters was the limit. When I added just one character\, I got a parsing error about four hundred lines away.

The parse error showed up for a line that read

  push (@​avery_common\, "+define+USER_TESTS=\\\"" . $es_tests_file . "\\\'');

the first time\, and the second time\, for a line the exact same distance away.


Flags​:   category=core   severity=medium


Site configuration information for perl v5.8.0​:

Configured by bhcompile at Sun Sep 1 23​:55​:07 EDT 2002.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration​:   Platform​:   osname=linux\, osvers=2.4.18-11smp\, archname=i386-linux-thread-multi   uname='linux daffy.perf.redhat.com 2.4.18-11smp #1 smp thu aug 15 06​:41​:59 edt 2002 i686 i686 i386 gnulinux '   config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dmyhostname=localhost -Dperladmin=root@​localhost -Dcc=gcc -Dcf_by=Red Hat\, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr'   hint=recommended\, useposix=true\, d_sigaction=define   usethreads=define use5005threads=undef useithreads=define usemultiplicity=define   useperlio=define d_sfio=undef uselargefiles=define usesocks=undef   use64bitint=undef use64bitall=undef uselongdouble=undef   usemymalloc=n\, bincompat5005=undef   Compiler​:   cc='gcc'\, ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm'\,   optimize='-O2 -march=i386 -mcpu=i686'\,   cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -I/usr/include/gdbm'   ccversion=''\, gccversion='3.2 20020822 (Red Hat Linux Rawhide 3.2-5)'\, 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   libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil   perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil   libc=/lib/libc-2.2.92.so\, so=so\, useshrplib=true\, libperl=libperl.so   gnulibc_version='2.2.92'   Dynamic Linking​:   dlsrc=dl_dlopen.xs\, dlext=so\, d_dlsymun=undef\, ccdlflags='-rdynamic -Wl\,-rpath\,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE'   cccdlflags='-fpic'\, lddlflags='-shared -L/usr/local/lib'

Locally applied patches​:  


@​INC for perl v5.8.0​:   /usr/lib/perl5/5.8.0/i386-linux-thread-multi   /usr/lib/perl5/5.8.0   /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi   /usr/lib/perl5/site_perl/5.8.0   /usr/lib/perl5/site_perl   /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi   /usr/lib/perl5/vendor_perl/5.8.0   /usr/lib/perl5/vendor_perl   .


Environment for perl v5.8.0​:   HOME=/home/emp/dmcallis   LANG=C   LANGUAGE (unset)

LD_LIBRARY_PATH=/usr/lib​:/usr/local/lib​:/project/cad/eda/lSPR50/tools/li b   LOGDIR (unset)

PATH=/usr/atria/bin​:.​:/home/emp/dmcallis/bin​:/bin​:/usr/X11R6/bin​:/usr/bi n​:/usr/sbin​:/sbin​:/usr/local/bin​:/usr/local/gtk/bin​:/vobs/sc2/bin​:/vobs/ bex/vendorlib/bin​:/vobs/bex/bin​:/project/harmony/local/bin​:/project/cad/ eda/Trolltech/qt-x11-commercial-3.3.2/bin​:/vobs/m2sys/ver/util/bin​:/proj ect/edaenv/bin   PERL_BADLANG (unset)   SHELL=/usr/local/bin/tcsh

Complete configuration data for perl v5.8.0​:

Author='' CONFIG='true' Date='$Date' Header='' Id='$Id' Locker='' Log='$Log' Mcc='Mcc' PATCHLEVEL='8' PERL_API_REVISION='5' PERL_API_SUBVERSION='0' PERL_API_VERSION='8' PERL_CONFIG_SH='true' PERL_REVISION='5' PERL_SUBVERSION='0' PERL_VERSION='8' RCSfile='$RCSfile' Revision='$Revision' SUBVERSION='0' Source='' State='' _a='.a' _exe='' _o='.o' afs='false' afsroot='/afs' alignbytes='4' ansi2knr='' aphostname='' api_revision='5' api_subversion='0' api_version='8' api_versionstring='5.8.0' ar='ar' archlib='/usr/lib/perl5/5.8.0/i386-linux-thread-multi' archlibexp='/usr/lib/perl5/5.8.0/i386-linux-thread-multi' archname='i386-linux-thread-multi' archname64='' archobjs='' asctime_r_proto='REENTRANT_PROTO_B_SB' awk='awk' baserev='5.0' bash='' bin='/usr/bin' binexp='/usr/bin' bison='bison' byacc='byacc' byteorder='1234' c='' castflags='0' cat='cat' cc='gcc' cccdlflags='-fpic' ccdlflags='-rdynamic -Wl\,-rpath\,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE' ccflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm' ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' ccname='gcc' ccsymbols='__GNUC_MINOR__=2 __GNUC_PATCHLEVEL__=0 __GXX_ABI_VERSION=102 __NO_INLINE__=1 __STDC_HOSTED__=1 __gnu_linux__=1 __i386=1 __i386__=1 __linux=1 __linux__=1 __tune_i386__=1 __unix=1 __unix__=1 cpu=i386 machine=i386 system=posix' ccversion='' cf_by='bhcompile' cf_email='bhcompile@​localhost.localdomain' cf_time='Sun Sep 1 23​:55​:07 EDT 2002' charsize='1' chgrp='' chmod='chmod' chown='' clocktype='clock_t' comm='comm' compress='' config_arg0='Configure' config_arg1='-des' config_arg10='-Dvendorprefix=/usr' config_arg11='-Dsiteprefix=/usr' config_arg12='-Duseshrplib' config_arg13='-Dusethreads' config_arg14='-Duseithreads' config_arg15='-Duselargefiles' config_arg16='-Dd_dosuid' config_arg17='-Dd_semctl_semun' config_arg18='-Di_db' config_arg19='-Ui_ndbm' config_arg2='-Doptimize=-O2 -march=i386 -mcpu=i686' config_arg20='-Di_gdbm' config_arg21='-Di_shadow' config_arg22='-Di_syslog' config_arg23='-Dman3ext=3pm' config_arg24='-Duseperlio' config_arg25='-Dinstallusrbinperl' config_arg26='-Ubincompat5005' config_arg27='-Uversiononly' config_arg28='-Dpager=/usr/bin/less -isr' config_arg3='-Dmyhostname=localhost' config_arg4='-Dperladmin=root@​localhost' config_arg5='-Dcc=gcc' config_arg6='-Dcf_by=Red Hat\, Inc.' config_arg7='-Dinstallprefix=/usr' config_arg8='-Dprefix=/usr' config_arg9='-Darchname=i386-linux' config_argc='28' config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dmyhostname=localhost -Dperladmin=root@​localhost -Dcc=gcc -Dcf_by=Red Hat\, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr' contains='grep' cp='cp' cpio='' cpp='cpp' cpp_stuff='42' cppccsymbols='__ELF__=1 __GNUC__=3 i386=1 linux=1 unix=1' cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -I/usr/include/gdbm' cpplast='-' cppminus='-' cpprun='gcc -E' cppstdin='gcc -E' cppsymbols='_FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=3 __GNUC_MINOR__=2 __GNU_LIBRARY__=6 _GNU_SOURCE=1 _LARGEFILE64_SOURCE=1 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506 _POSIX_SOURCE=1 _REENTRANT=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_GNU=1 __USE_LARGEFILE=1 __USE_LARGEFILE64=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_REENTRANT=1 __USE_SVID=1 __USE_UNIX98=1 __USE_XOPEN=1 __USE_XOPEN_EXTENDED=1 _XOPEN_SOURCE=600 _XOPEN_SOURCE_EXTENDED=1 __i386=1 __i386__=1 __linux=1 __linux__=1 __unix=1 __unix__=1' crypt_r_proto='REENTRANT_PROTO_B_CCS' cryptlib='' csh='csh' ctermid_r_proto='0' ctime_r_proto='REENTRANT_PROTO_B_SB' d_Gconvert='gcvt((x)\,(n)\,(b))' d_PRIEUldbl='define' d_PRIFUldbl='define' d_PRIGUldbl='define' d_PRIXU64='define' d_PRId64='define' d_PRIeldbl='define' d_PRIfldbl='define' d_PRIgldbl='define' d_PRIi64='define' d_PRIo64='define' d_PRIu64='define' d_PRIx64='define' d_SCNfldbl='define' d__fwalk='' d_access='define' d_accessx='' d_alarm='define' d_archlib='define' d_asctime_r='define' d_atolf='' d_atoll='define' d_attribut='define' d_bcmp='define' d_bcopy='define' d_bsd='' d_bsdgetpgrp='' d_bsdsetpgrp='' d_bzero='define' d_casti32='' d_castneg='define' d_charvspr='' d_chown='define' d_chroot='define' d_chsize='' d_class='' d_closedir='define' d_cmsghdr_s='define' d_const='define' d_crypt='define' d_crypt_r='define' d_csh='define' d_ctermid_r='' d_ctime_r='define' d_cuserid='define' d_dbl_dig='define' d_dbminitproto='' d_difftime='define' d_dirfd='define' d_dirnamlen='' d_dlerror='define' d_dlopen='define' d_dlsymun='' d_dosuid='define' d_drand48_r='define' d_drand48proto='define' d_dup2='define' d_eaccess='' d_endgrent='define' d_endgrent_r='' d_endhent='define' d_endhostent_r='' d_endnent='define' d_endnetent_r='' d_endpent='define' d_endprotoent_r='' d_endpwent='define' d_endpwent_r='' d_endsent='define' d_endservent_r='' d_eofnblk='define' d_eunice='' d_fchdir='define' d_fchmod='define' d_fchown='define' d_fcntl='define' d_fcntl_can_lock='define' d_fd_macros='define' d_fd_set='define' d_fds_bits='define' d_fgetpos='define' d_finite='define' d_finitel='define' d_flexfnam='define' d_flock='define' d_flockproto='define' d_fork='define' d_fp_class='' d_fpathconf='define' d_fpclass='' d_fpclassify='' d_fpclassl='' d_fpos64_t='' d_frexpl='define' d_fs_data_s='' d_fseeko='define' d_fsetpos='define' d_fstatfs='define' d_fstatvfs='define' d_fsync='define' d_ftello='define' d_ftime='' d_getcwd='define' d_getespwnam='' d_getfsstat='' d_getgrent='define' d_getgrent_r='define' d_getgrgid_r='define' d_getgrnam_r='define' d_getgrps='define' d_gethbyaddr='define' d_gethbyname='define' d_gethent='define' d_gethname='define' d_gethostbyaddr_r='' d_gethostbyname_r='define' d_gethostent_r='define' d_gethostprotos='define' d_getitimer='define' d_getlogin='define' d_getlogin_r='define' d_getmnt='' d_getmntent='define' d_getnbyaddr='define' d_getnbyname='define' d_getnent='define' d_getnetbyaddr_r='' d_getnetbyname_r='define' d_getnetent_r='define' d_getnetprotos='define' d_getpagsz='define' d_getpbyname='define' d_getpbynumber='define' d_getpent='define' d_getpgid='define' d_getpgrp='define' d_getpgrp2='' d_getppid='define' d_getprior='define' d_getprotobyname_r='define' d_getprotobynumber_r='define' d_getprotoent_r='define' d_getprotoprotos='define' d_getprpwnam='' d_getpwent='define' d_getpwent_r='define' d_getpwnam_r='define' d_getpwuid_r='define' d_getsbyname='define' d_getsbyport='define' d_getsent='define' d_getservbyname_r='define' d_getservbyport_r='define' d_getservent_r='define' d_getservprotos='define' d_getspnam='define' d_getspnam_r='define' d_gettimeod='define' d_gmtime_r='define' d_gnulibc='define' d_grpasswd='define' d_hasmntopt='define' d_htonl='define' d_index='' d_inetaton='define' d_int64_t='define' d_isascii='define' d_isfinite='' d_isinf='define' d_isnan='define' d_isnanl='define' d_killpg='define' d_lchown='define' d_ldbl_dig='define' d_link='define' d_localtime_r='define' d_locconv='define' d_lockf='define' d_longdbl='define' d_longlong='define' d_lseekproto='define' d_lstat='define' d_madvise='define' d_mblen='define' d_mbstowcs='define' d_mbtowc='define' d_memchr='define' d_memcmp='define' d_memcpy='define' d_memmove='define' d_memset='define' d_mkdir='define' d_mkdtemp='define' d_mkfifo='define' d_mkstemp='define' d_mkstemps='' d_mktime='define' d_mmap='define' d_modfl='define' d_modfl_pow32_bug='' d_mprotect='define' d_msg='define' d_msg_ctrunc='define' d_msg_dontroute='define' d_msg_oob='define' d_msg_peek='define' d_msg_proxy='define' d_msgctl='define' d_msgget='define' d_msghdr_s='define' d_msgrcv='define' d_msgsnd='define' d_msync='define' d_munmap='define' d_mymalloc='' d_nice='define' d_nl_langinfo='define' d_nv_preserves_uv='define' d_off64_t='define' d_old_pthread_create_joinable='' d_oldpthreads='' d_oldsock='' d_open3='define' d_pathconf='define' d_pause='define' d_perl_otherlibdirs='' d_phostname='' d_pipe='define' d_poll='define' d_portable='define' d_procselfexe='define' d_pthread_atfork='define' d_pthread_yield='define' d_pwage='' d_pwchange='' d_pwclass='' d_pwcomment='' d_pwexpire='' d_pwgecos='define' d_pwpasswd='define' d_pwquota='' d_qgcvt='define' d_quad='define' d_random_r='' d_readdir='define' d_readdir64_r='define' d_readdir_r='define' d_readlink='define' d_readv='define' d_recvmsg='define' d_rename='define' d_rewinddir='define' d_rmdir='define' d_safebcpy='' d_safemcpy='' d_sanemcmp='define' d_sbrkproto='define' d_sched_yield='define' d_scm_rights='define' d_seekdir='define' d_select='define' d_sem='define' d_semctl='define' d_semctl_semid_ds='define' d_semctl_semun='define' d_semget='define' d_semop='define' d_sendmsg='define' d_setegid='define' d_seteuid='define' d_setgrent='define' d_setgrent_r='' d_setgrps='define' d_sethent='define' d_sethostent_r='' d_setitimer='define' d_setlinebuf='define' d_setlocale='define' d_setlocale_r='' d_setnent='define' d_setnetent_r='' d_setpent='define' d_setpgid='define' d_setpgrp='define' d_setpgrp2='' d_setprior='define' d_setproctitle='' d_setprotoent_r='' d_setpwent='define' d_setpwent_r='' d_setregid='define' d_setresgid='define' d_setresuid='define' d_setreuid='define' d_setrgid='' d_setruid='' d_setsent='define' d_setservent_r='' d_setsid='define' d_setvbuf='define' d_sfio='' d_shm='define' d_shmat='define' d_shmatprototype='define' d_shmctl='define' d_shmdt='define' d_shmget='define' d_sigaction='define' d_sigprocmask='define' d_sigsetjmp='define' d_sockatmark='define' d_sockatmarkproto='define' d_socket='define' d_socklen_t='define' d_sockpair='define' d_socks5_init='' d_sqrtl='define' d_srand48_r='define' d_srandom_r='define' d_sresgproto='' d_sresuproto='' d_statblks='define' d_statfs_f_flags='' d_statfs_s='define' d_statvfs='define' d_stdio_cnt_lval='' d_stdio_ptr_lval='' d_stdio_ptr_lval_nochange_cnt='' d_stdio_ptr_lval_sets_cnt='' d_stdio_stream_array='' d_stdiobase='' d_stdstdio='' d_strchr='define' d_strcoll='define' d_strctcpy='define' d_strerrm='strerror(e)' d_strerror='define' d_strerror_r='define' d_strftime='define' d_strtod='define' d_strtol='define' d_strtold='define' d_strtoll='define' d_strtoq='define' d_strtoul='define' d_strtoull='define' d_strtouq='define' d_strxfrm='define' d_suidsafe='' d_symlink='define' d_syscall='define' d_syscallproto='define' d_sysconf='define' d_sysernlst='' d_syserrlst='define' d_system='define' d_tcgetpgrp='define' d_tcsetpgrp='define' d_telldir='define' d_telldirproto='define' d_time='define' d_times='define' d_tm_tm_gmtoff='define' d_tm_tm_zone='define' d_tmpnam_r='define' d_truncate='define' d_ttyname_r='define' d_tzname='define' d_u32align='define' d_ualarm='define' d_umask='define' d_uname='define' d_union_semun='' d_unordered='' d_usleep='define' d_usleepproto='define' d_ustat='define' d_vendorarch='define' d_vendorbin='define' d_vendorlib='define' d_vfork='' d_void_closedir='' d_voidsig='define' d_voidtty='' d_volatile='define' d_vprintf='define' d_wait4='define' d_waitpid='define' d_wcstombs='define' d_wctomb='define' d_writev='define' d_xenix='' date='date' db_hashtype='u_int32_t' db_prefixtype='size_t' db_version_major='4' db_version_minor='0' db_version_patch='14' defvoidused='15' direntrytype='struct dirent' dlext='so' dlsrc='dl_dlopen.xs' doublesize='8' drand01='drand48()' drand48_r_proto='REENTRANT_PROTO_I_ST' dynamic_ext='B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call GDBM_File I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared' eagain='EAGAIN' ebcdic='' echo='echo' egrep='egrep' emacs='' endgrent_r_proto='0' endhostent_r_proto='0' endnetent_r_proto='0' endprotoent_r_proto='0' endpwent_r_proto='0' endservent_r_proto='0' eunicefix='​:' exe_ext='' expr='expr' extensions='B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call GDBM_File I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Errno' extras='' fflushNULL='define' fflushall='' find='' firstmakefile='makefile' flex='' fpossize='16' fpostype='fpos_t' freetype='void' from='​:' full_ar='/usr/bin/ar' full_csh='/bin/csh' full_sed='/bin/sed' gccosandvers='' gccversion='3.2 20020822 (Red Hat Linux Rawhide 3.2-5)' getgrent_r_proto='REENTRANT_PROTO_I_SBWR' getgrgid_r_proto='REENTRANT_PROTO_I_TSBWR' getgrnam_r_proto='REENTRANT_PROTO_I_CSBWR' gethostbyaddr_r_proto='0' gethostbyname_r_proto='REENTRANT_PROTO_I_CSBWRE' gethostent_r_proto='REENTRANT_PROTO_I_SBWRE' getlogin_r_proto='REENTRANT_PROTO_I_BW' getnetbyaddr_r_proto='0' getnetbyname_r_proto='REENTRANT_PROTO_I_CSBWRE' getnetent_r_proto='REENTRANT_PROTO_I_SBWRE' getprotobyname_r_proto='REENTRANT_PROTO_I_CSBWR' getprotobynumber_r_proto='REENTRANT_PROTO_I_ISBWR' getprotoent_r_proto='REENTRANT_PROTO_I_SBWR' getpwent_r_proto='REENTRANT_PROTO_I_SBWR' getpwnam_r_proto='REENTRANT_PROTO_I_CSBWR' getpwuid_r_proto='REENTRANT_PROTO_I_TSBWR' getservbyname_r_proto='REENTRANT_PROTO_I_CCSBWR' getservbyport_r_proto='REENTRANT_PROTO_I_ICSBWR' getservent_r_proto='REENTRANT_PROTO_I_SBWR' getspnam_r_proto='REENTRANT_PROTO_I_CSBWR' gidformat='"lu"' gidsign='1' gidsize='4' gidtype='gid_t' glibpth='/usr/shlib /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib ' gmake='gmake' gmtime_r_proto='REENTRANT_PROTO_S_TS' gnulibc_version='2.2.92' grep='grep' groupcat='cat /etc/group' groupstype='gid_t' gzip='gzip' h_fcntl='false' h_sysfile='true' hint='recommended' hostcat='cat /etc/hosts' i16size='2' i16type='short' i32size='4' i32type='long' i64size='8' i64type='long long' i8size='1' i8type='char' i_arpainet='define' i_bsdioctl='' i_crypt='define' i_db='define' i_dbm='' i_dirent='define' i_dld='' i_dlfcn='define' i_fcntl='' i_float='define' i_fp='' i_fp_class='' i_gdbm='define' i_grp='define' i_ieeefp='' i_inttypes='define' i_langinfo='define' i_libutil='' i_limits='define' i_locale='define' i_machcthr='' i_malloc='define' i_math='define' i_memory='' i_mntent='define' i_ndbm='' i_netdb='define' i_neterrno='' i_netinettcp='define' i_niin='define' i_poll='define' i_prot='' i_pthread='define' i_pwd='define' i_rpcsvcdbm='' i_sfio='' i_sgtty='' i_shadow='define' i_socks='' i_stdarg='define' i_stddef='define' i_stdlib='define' i_string='define' i_sunmath='' i_sysaccess='' i_sysdir='define' i_sysfile='define' i_sysfilio='' i_sysin='' i_sysioctl='define' i_syslog='define' i_sysmman='define' i_sysmode='' i_sysmount='define' i_sysndir='' i_sysparam='define' i_sysresrc='define' i_syssecrt='' i_sysselct='define' i_syssockio='' i_sysstat='define' i_sysstatfs='define' i_sysstatvfs='define' i_systime='define' i_systimek='' i_systimes='define' i_systypes='define' i_sysuio='define' i_sysun='define' i_sysutsname='define' i_sysvfs='define' i_syswait='define' i_termio='' i_termios='define' i_time='define' i_unistd='define' i_ustat='define' i_utime='define' i_values='define' i_varargs='' i_varhdr='stdarg.h' i_vfork='' ignore_versioned_solibs='y' inc_version_list='5.6.1' inc_version_list_init='"5.6.1"\,0' incpath='' inews='' installarchlib='/usr/lib/perl5/5.8.0/i386-linux-thread-multi' installbin='/usr/bin' installman1dir='/usr/share/man/man1' installman3dir='/usr/share/man/man3' installprefix='/usr' installprefixexp='/usr' installprivlib='/usr/lib/perl5/5.8.0' installscript='/usr/bin' installsitearch='/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi' installsitebin='/usr/bin' installsitelib='/usr/lib/perl5/site_perl/5.8.0' installstyle='lib/perl5' installusrbinperl='define' installvendorarch='/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-mu lti' installvendorbin='/usr/bin' installvendorlib='/usr/lib/perl5/vendor_perl/5.8.0' intsize='4' issymlink='/usr/bin/test -h' ivdformat='"ld"' ivsize='4' ivtype='long' known_extensions='B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call GDBM_File I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Thread Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared' ksh='' ld='gcc' lddlflags='-shared -L/usr/local/lib' ldflags=' -L/usr/local/lib' ldflags_uselargefiles='' ldlibpthname='LD_LIBRARY_PATH' less='less' lib_ext='.a' libc='/lib/libc-2.2.92.so' libperl='libperl.so' libpth='/usr/local/lib /lib /usr/lib' libs='-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil' libsdirs=' /usr/lib /lib' libsfiles=' libnsl.so libgdbm.so libdb.so libdl.so libm.so libpthread.so libc.so libcrypt.so libutil.so' libsfound=' /usr/lib/libnsl.so /usr/lib/libgdbm.so /lib/libdb.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libpthread.so /usr/lib/libc.so /usr/lib/libcrypt.so /usr/lib/libutil.so' libspath=' /usr/local/lib /lib /usr/lib' libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m pthread c cposix posix ndir dir crypt sec ucb BSD PW x util' libswanted_uselargefiles='' line='' lint='' lkflags='' ln='ln' lns='/bin/ln -s' localtime_r_proto='REENTRANT_PROTO_S_TS' locincpth='/opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include' loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib' longdblsize='12' longlongsize='8' longsize='4' lp='' lpr='' ls='ls' lseeksize='8' lseektype='off_t' mail='' mailx='' make='make' make_set_make='#' mallocobj='' mallocsrc='' malloctype='void *' man1dir='/usr/share/man/man1' man1direxp='/usr/share/man/man1' man1ext='1' man3dir='/usr/share/man/man3' man3direxp='/usr/share/man/man3' man3ext='3pm' mips_type='' mkdir='mkdir' mmaptype='void *' modetype='mode_t' more='more' multiarch='' mv='' myarchname='i686-linux' mydomain='.localdomain' myhostname='localhost' myuname='linux daffy.perf.redhat.com 2.4.18-11smp #1 smp thu aug 15 06​:41​:59 edt 2002 i686 i686 i386 gnulinux ' n='-n' need_va_copy='' netdb_hlen_type='size_t' netdb_host_type='const void *' netdb_name_type='const char *' netdb_net_type='in_addr_t' nm='nm' nm_opt='' nm_so_opt='--dynamic' nonxs_ext='Errno' nroff='nroff' nvEUformat='"E"' nvFUformat='"F"' nvGUformat='"G"' nv_preserves_uv_bits='32' nveformat='"e"' nvfformat='"f"' nvgformat='"g"' nvsize='8' nvtype='double' o_nonblock='O_NONBLOCK' obj_ext='.o' old_pthread_create_joinable='' optimize='-O2 -march=i386 -mcpu=i686' orderlib='false' osname='linux' osvers='2.4.18-11smp' otherlibdirs=' ' package='perl5' pager='/usr/bin/less -isr' passcat='cat /etc/passwd' patchlevel='8' path_sep='​:' perl='' perl5='/usr/bin/perl' perl_patchlevel='' perladmin='root@​localhost' perllibs='-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil' perlpath='/usr/bin/perl' pg='pg' phostname='' pidtype='pid_t' plibpth='' pm_apiversion='5.005' pmake='' pr='' prefix='/usr' prefixexp='/usr' privlib='/usr/lib/perl5/5.8.0' privlibexp='/usr/lib/perl5/5.8.0' procselfexe='"/proc/self/exe"' prototype='define' ptrsize='4' quadkind='3' quadtype='long long' randbits='48' randfunc='drand48' random_r_proto='0' randseedtype='long' ranlib='​:' rd_nodata='-1' readdir64_r_proto='REENTRANT_PROTO_I_TSR' readdir_r_proto='REENTRANT_PROTO_I_TSR' revision='5' rm='rm' rmail='' run='' runnm='false' sPRIEUldbl='"LE"' sPRIFUldbl='"LF"' sPRIGUldbl='"LG"' sPRIXU64='"LX"' sPRId64='"Ld"' sPRIeldbl='"Le"' sPRIfldbl='"Lf"' sPRIgldbl='"Lg"' sPRIi64='"Li"' sPRIo64='"Lo"' sPRIu64='"Lu"' sPRIx64='"Lx"' sSCNfldbl='"Lf"' sched_yield='sched_yield()' scriptdir='/usr/bin' scriptdirexp='/usr/bin' sed='sed' seedfunc='srand48' selectminbits='32' selecttype='fd_set *' sendmail='' setgrent_r_proto='0' sethostent_r_proto='0' setlocale_r_proto='0' setnetent_r_proto='0' setprotoent_r_proto='0' setpwent_r_proto='0' setservent_r_proto='0' sh='/bin/sh' shar='' sharpbang='#!' shmattype='void *' shortsize='2' shrpenv='' shsharp='true' sig_count='64' sig_name='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS NUM32 NUM33 NUM34 RTMIN NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43 NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58 NUM59 NUM60 NUM61 NUM62 RTMAX IOT CLD POLL UNUSED ' sig_name_init='"ZERO"\, "HUP"\, "INT"\, "QUIT"\, "ILL"\, "TRAP"\, "ABRT"\, "BUS"\, "FPE"\, "KILL"\, "USR1"\, "SEGV"\, "USR2"\, "PIPE"\, "ALRM"\, "TERM"\, "STKFLT"\, "CHLD"\, "CONT"\, "STOP"\, "TSTP"\, "TTIN"\, "TTOU"\, "URG"\, "XCPU"\, "XFSZ"\, "VTALRM"\, "PROF"\, "WINCH"\, "IO"\, "PWR"\, "SYS"\, "NUM32"\, "NUM33"\, "NUM34"\, "RTMIN"\, "NUM36"\, "NUM37"\, "NUM38"\, "NUM39"\, "NUM40"\, "NUM41"\, "NUM42"\, "NUM43"\, "NUM44"\, "NUM45"\, "NUM46"\, "NUM47"\, "NUM48"\, "NUM49"\, "NUM50"\, "NUM51"\, "NUM52"\, "NUM53"\, "NUM54"\, "NUM55"\, "NUM56"\, "NUM57"\, "NUM58"\, "NUM59"\, "NUM60"\, "NUM61"\, "NUM62"\, "RTMAX"\, "IOT"\, "CLD"\, "POLL"\, "UNUSED"\, 0' sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 6 17 29 31 ' sig_num_init='0\, 1\, 2\, 3\, 4\, 5\, 6\, 7\, 8\, 9\, 10\, 11\, 12\, 13\, 14\, 15\, 16\, 17\, 18\, 19\, 20\, 21\, 22\, 23\, 24\, 25\, 26\, 27\, 28\, 29\, 30\, 31\, 32\, 33\, 34\, 35\, 36\, 37\, 38\, 39\, 40\, 41\, 42\, 43\, 44\, 45\, 46\, 47\, 48\, 49\, 50\, 51\, 52\, 53\, 54\, 55\, 56\, 57\, 58\, 59\, 60\, 61\, 62\, 63\, 6\, 17\, 29\, 31\, 0' sig_size='68' signal_t='void' sitearch='/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi' sitearchexp='/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi' sitebin='/usr/bin' sitebinexp='/usr/bin' sitelib='/usr/lib/perl5/site_perl/5.8.0' sitelib_stem='/usr/lib/perl5/site_perl' sitelibexp='/usr/lib/perl5/site_perl/5.8.0' siteprefix='/usr' siteprefixexp='/usr' sizesize='4' sizetype='size_t' sleep='' smail='' so='so' sockethdr='' socketlib='' socksizetype='socklen_t' sort='sort' spackage='Perl5' spitshell='cat' srand48_r_proto='REENTRANT_PROTO_I_LS' srandom_r_proto='REENTRANT_PROTO_I_TS' src='.' ssizetype='ssize_t' startperl='#!/usr/bin/perl' startsh='#!/bin/sh' static_ext=' ' stdchar='char' stdio_base='((fp)->_IO_read_base)' stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)' stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)' stdio_filbuf='' stdio_ptr='((fp)->_IO_read_ptr)' stdio_stream_array='' strerror_r_proto='REENTRANT_PROTO_B_IBW' strings='/usr/include/string.h' submit='' subversion='0' sysman='/usr/share/man/man1' tail='' tar='' targetarch='' tbl='' tee='' test='test' timeincl='/usr/include/sys/time.h /usr/include/time.h ' timetype='time_t' tmpnam_r_proto='REENTRANT_PROTO_B_B' to='​:' touch='touch' tr='tr' trnl='\n' troff='' ttyname_r_proto='REENTRANT_PROTO_I_IBW' u16size='2' u16type='unsigned short' u32size='4' u32type='unsigned long' u64size='8' u64type='unsigned long long' u8size='1' u8type='unsigned char' uidformat='"lu"' uidsign='1' uidsize='4' uidtype='uid_t' uname='uname' uniq='uniq' uquadtype='unsigned long long' use5005threads='' use64bitall='' use64bitint='' usecrosscompile='' usedl='define' useithreads='define' uselargefiles='define' uselongdouble='' usemorebits='' usemultiplicity='define' usemymalloc='n' usenm='false' useopcode='true' useperlio='define' useposix='true' usereentrant='' usesfio='false' useshrplib='true' usesocks='' usethreads='define' usevendorprefix='define' usevfork='false' usrinc='/usr/include' uuname='' uvXUformat='"lX"' uvoformat='"lo"' uvsize='4' uvtype='unsigned long' uvuformat='"lu"' uvxformat='"lx"' vendorarch='/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi' vendorarchexp='/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi' vendorbin='/usr/bin' vendorbinexp='/usr/bin' vendorlib='/usr/lib/perl5/vendor_perl/5.8.0' vendorlib_stem='/usr/lib/perl5/vendor_perl' vendorlibexp='/usr/lib/perl5/vendor_perl/5.8.0' vendorprefix='/usr' vendorprefixexp='/usr' version='5.8.0' version_patchlevel_string='version 8 subversion 0' versiononly='' vi='' voidflags='15' xlibpth='/usr/lib/386 /lib/386' xs_apiversion='5.8.0' yacc='/usr/bin/byacc' yaccflags='' zcat='' zip='zip'

p5pRT commented 19 years ago

From @iabyn

On Mon\, Dec 20\, 2004 at 09​:38​:09PM -0000\, dmcallis @​ es. com wrote​:

I was using the "Here" document syntax to document the usage of a script. As I added functionality\, I would add to the here-document. As I added one trivial function\, my script started having parsing errors a few hundred lines away with

I'm afraid your description is a bit vague. Would it be possible to provide a short but complete script that demonstrates the problem? Include a description of what output you see and how it differs from what you expect.

Thanks\,

Dave.

-- The Enterprise's efficient long-range scanners detect a temporal vortex distortion in good time\, allowing it to be safely avoided via a minor course correction.   -- Things That Never Happen in "Star Trek" #21

p5pRT commented 19 years ago

The RT System itself - Status changed from 'new' to 'open'

p5pRT commented 19 years ago

From dmcallis@es.com

Hello Dave\,

I agree and apologize for the vagueness of the message. I was in the midst of solving a problem and rushed my bug description. I can provide a more complete description of the problem\, but I'm not sure if I can provide a short script demonstrating the problem. I'll provide the original script\, and hopefully it will demonstrate the same behavior.

The script is used to invoke a hardware simulator by parsing a list of inputs and then setting up the preprocessor (ncprep)\, compiler (ncvlog)\, elaborator (ncelab)\, and simulator (ncsim). The nc* applications all have several possible command line options\, so as we find useful switches and incorporate them into our methodology\, they are added to the script. It's hard to keep track of all of the options\, so there is a usage section. Please overlook the used only once variables and the commented out code as this is an evolving script and it is not without a few leftovers.

Now that you have the script\, here is a more specific description of the problem. The script was running fine\, and then I added the -a option. This required a few changes\, as summarized below.

* Added line 125​:
  -a​: turn on assertions ... * Added line 200​:   $assertions = "";... * Added lines 379 through 383​:   } elsif ($this_key eq "a")... * Modified line 735 by inserting " . $assertions" into the right-hand side of the equation

When I ran the script (using the command line "goVerify.pl config_1_10 +NO_MBIST +NO_SERDES +quicksims"\, where config_1_10 is the name of the test scenario)\, I got the following error message.

String found where operator expected at /vobs/bex/bin/goVerify line 524\, near ""+define+USER_NEGOT_TESTS=\\\ "" . $es_negot_tests_file . ""   (Missing operator before " . $es_negot_tests_file . "?) Backslash found where operator expected at /vobs/bex/bin/goVerify line 524\, near "" . $es_negot_tests_file . "\"   (Missing operator before \?) syntax error at /vobs/bex/bin/goVerify line 524\, near ""+define+USER_NEGOT_TESTS=\\\ "" . $es_negot_tests_file . "" Execution of /vobs/bex/bin/goVerify aborted due to compilation errors.

I originally focused on line 125 - the line added to the usage here-document. I removed it and got the same failure\, but when I just removed the portion after the word "pass"\, the script ran. I put back the words and the script fails. When I get rid of everything on that line after the word "assertions"\, the test ends up printing the usage section and exiting.

I find this behavior interesting. Initially\, I didn't have time to debug the problem\, so I found that I could modify the cumbersome lines around line 524\, changing them to a plain define but not giving them a value. This caused the test to pass. But later\, when I added another option (not included)\, the strange failures showed up again.

Hopefully this will give you enough to go on. I tried to run perl -d\, but I don't seem to get my code - instead\, I get​:

  Loading DB routines from perl5db.pl version 1.19   Editor support available.

  Enter h or `h h' for help\, or `man perldebug' for more help.

  Switch​::filter_blocks(/usr/lib/perl5/5.8.0/Switch.pm​:94)​:   94​: component​: while (pos $source \< length $source)   95​: {   DB\<1>

I've been using perl for years\, but don't claim to be an expert. I've never used the debugger\, but from looking at tutorials\, I expected to be able to run through my code using the debugger. Instead I seem to be parsing my code\, one character at a time.

Hope this is enough\, but not too much.

Thanks again\, -Dave

 

-----Original Message----- From​: Dave Mitchell via RT [mailto​:perlbug-followup@​perl.org] Sent​: Tuesday\, December 21\, 2004 3​:59 PM To​: Dave McAllister Subject​: Re​: [perl #33128] Here-document length bug

On Mon\, Dec 20\, 2004 at 09​:38​:09PM -0000\, dmcallis @​ es. com wrote​:

I was using the "Here" document syntax to document the usage of a script. As I added functionality\, I would add to the here-document.
As I added one trivial function\, my script started having parsing errors a few hundred lines away with

I'm afraid your description is a bit vague. Would it be possible to provide a short but complete script that demonstrates the problem? Include a description of what output you see and how it differs from what you expect.

Thanks\,

Dave.

-- The Enterprise's efficient long-range scanners detect a temporal vortex distortion in good time\, allowing it to be safely avoided via a minor course correction.   -- Things That Never Happen in "Star Trek" #21

p5pRT commented 19 years ago

From dmcallis@es.com

goVerify.pl

p5pRT commented 19 years ago

From dmcallis@es.com

Hello Dave\,

I replied earlier with quite a bit of information\, but I wanted to add this piece. I have been spending more time trying to debug this\, and I think there is a good chance it has to do with the "use Switch;" on line 12.

-Dave

-----Original Message----- From​: Dave Mitchell via RT [mailto​:perlbug-followup@​perl.org] Sent​: Tuesday\, December 21\, 2004 3​:59 PM To​: Dave McAllister Subject​: Re​: [perl #33128] Here-document length bug

On Mon\, Dec 20\, 2004 at 09​:38​:09PM -0000\, dmcallis @​ es. com wrote​:

I was using the "Here" document syntax to document the usage of a script. As I added functionality\, I would add to the here-document.
As I added one trivial function\, my script started having parsing errors a few hundred lines away with

I'm afraid your description is a bit vague. Would it be possible to provide a short but complete script that demonstrates the problem? Include a description of what output you see and how it differs from what you expect.

Thanks\,

Dave.

-- The Enterprise's efficient long-range scanners detect a temporal vortex distortion in good time\, allowing it to be safely avoided via a minor course correction.   -- Things That Never Happen in "Star Trek" #21

p5pRT commented 19 years ago

From @schwern

On Tue\, Dec 21\, 2004 at 10​:25​:00PM -0700\, dmcallis@​es.com wrote​:

I replied earlier with quite a bit of information\, but I wanted to add this piece. I have been spending more time trying to debug this\, and I think there is a good chance it has to do with the "use Switch;" on line 12.

To amplify this\, Switch.pm is a source filter. It reads in your source code\, alters it and recompiles. Since Perl parsing is not a perfect art it sometimes gets things wrong.

-- Michael G Schwern schwern@​pobox.com http​://www.pobox.com/~schwern/ Great minds think.

p5pRT commented 19 years ago

From nospam-abuse@bloodgate.com

-----BEGIN PGP SIGNED MESSAGE-----

Moin\,

\dmcallis@&#8203;es\.com wrote​:

Hello Dave\,

I replied earlier with quite a bit of information\, but I wanted to add this piece. I have been spending more time trying to debug this\, and I think there is a good chance it has to do with the "use Switch;" on line 12.

I tried to run the script w/ v5.8.6 (ugh\, that could have rooted my system :) and it complains about ENV variables not set. However\, it did compile fine.

As you are running Perl 5.8.0\, a rather outdated version\, could you please download 5.8.6\, and try it again with that version?

In addtion\, Switch.pm seems not used in the script\, so you might simple remove it.

I vaguely remember some Switch.pm related fixed in the past. Here is a change log​:

http​://public.activestate.com/cgi-bin/perlbrowse?file=lib%2FSwitch.pm&log=1

Best wishes\,

Tels

- -- Signed on Wed Dec 22 17​:33​:03 2004 with key 0x93B84C15. Visit my photo gallery at http​://bloodgate.com/photos/ PGP key on http​://bloodgate.com/tels.asc or per email.

"Now\, _you_ behave!"

-----BEGIN PGP SIGNATURE----- Version​: GnuPG v1.2.4 (GNU/Linux)

iQEVAwUBQcmjSXcLPEOTuEwVAQE+Fgf+PMq6z+8GHiMtR3nnKqxSbxoTnTzadPX/ eKRoJXVkvZTn1/ZV5xX4lT7cmuOfN7a7BXuC0ATTqMVP7Kg6RFDkCXpZNWO87Gal SL6rA3Lxf9sGfoQf929/mi34YcuQB+qz4ohutzywoeXT/9pBNQqnRO4mOtFPhiWH BwiMzlTmySwag5GVANzycF7nwBsuEeb8gI/wd5J853HIKO5AAX5VCRjm0TsRetN4 dE0Iu1xextTVfkPK4IIdD4dVXm1Pw+TpSPRgBEaWJNSQdImpLwyE8wnttrBL76Ul ai53xDku6cWw7WYen6Jvhz0C9N72yRXkKD6E+ti1+iJ+B5oucowj6w== =HxL9 -----END PGP SIGNATURE-----

p5pRT commented 13 years ago

From @cpansprout

Not being able to reproduce this in 5.8.1\, I’m assuming that the upgrade from Switch 2.09 to 2.10 fixed it.

p5pRT commented 13 years ago

@cpansprout - Status changed from 'open' to 'resolved'