Skip to content
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

Assertion failure in toke.c #300

Closed
p5pRT opened this issue Jul 31, 1999 · 2 comments
Closed

Assertion failure in toke.c #300

p5pRT opened this issue Jul 31, 1999 · 2 comments

Comments

@p5pRT
Copy link

p5pRT commented Jul 31, 1999

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

Searchable as RT1123$

@p5pRT
Copy link
Author

p5pRT commented Jul 31, 1999

From ian@dial.pipex.com

perl -e "@​a'"
Assertion failed​: file "toke.c", line 158 at -e line 1.

Same effect using [$%*] instead of @​. Same under 5.00404, 5.00558

(BTW Isn't it about time to deprecate $a'a ?)

Perl Info


This perlbug was built using Perl 5.00404 - Sun Apr 26 12:56:41 BST 1998
It is being executed now by  Perl 5.00558 - Thu Jul 29 22:26:37 BST 1999.

Site configuration information for perl 5.00404:

Configured by ian at Sun Apr 26 12:56:41 BST 1998.

Summary of my perl5 (5.0 patchlevel 4 subversion 4) configuration:
  Platform:
    osname=linux, osvers=2.0.0, archname=i586-linux
    uname='linux penstock 2.0.0 #1 mon jan 20 15:07:14 gmt 1997 i586 '
    hint=previous, useposix=true, d_sigaction=define
    bincompat3=n useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-O2', gccversion=2.7.2
    cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
    ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
    stdchar='char', d_stdstdio=define, usevfork=false
    voidflags=15, castflags=0, d_casti32=define, d_castneg=define
    intsize=4, alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lgdbm -ldb -ldl -lm -lc
    libc=/lib/libc.so.5.3.12, so=so
    useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    


@INC for perl 5.00404:
    /u2/ian/lib/perl5
    /usr/local/lib/perl5/i586-linux/5.00404
    /usr/local/lib/perl5
    /usr/local/lib/perl5/site_perl/i586-linux
    /usr/local/lib/perl5/site_perl
    .


Environment for perl 5.00404:
    HOME=/u2/ian
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/u2/ian/cmd:/u2/ian/Linux:/usr/local/bin:/u2/ian/stocks/cmd:/usr/openwin/bin:/usr/bin/X11:/usr/bin:/bin:/usr/lib/teTeX/bin:/usr/etc:/sbin:/usr/sbin
    PERL5LIB=/u2/ian/lib/perl5
    PERL_BADLANG (unset)
    SHELL=/bin/zsh

@p5pRT
Copy link
Author

p5pRT commented Sep 12, 1999

From @gsar

On Sun, 01 Aug 1999 00​:45​:16 BST, Ian Phillipps wrote​:

perl -e "@​a'"
Assertion failed​: file "toke.c", line 158 at -e line 1.

Same effect using [$%*] instead of @​. Same under 5.00404, 5.00558

(BTW Isn't it about time to deprecate $a'a ?)

Do not underestimate the vast stillness of Perl4 that lies
festering in the far reaches of the planet!

Sarathy
gsar@​activestate.com

Inline Patch
-----------------------------------8<-----------------------------------
Change 4133 by gsar@auger on 1999/09/13 03:25:43

	avoid assertion failure on C<@a'>

Affected files ...

... //depot/perl/toke.c#148 edit

Differences ...

==== //depot/perl/toke.c#148 (text) ====
Index: perl/toke.c
--- perl/toke.c.~1~	Sun Sep 12 20:25:47 1999
+++ perl/toke.c	Sun Sep 12 20:25:47 1999
@@ -213,8 +213,12 @@
     char *oldbp = PL_bufptr;
     bool is_first = (PL_oldbufptr == PL_linestart);
 
-    assert(s >= oldbp);
-    PL_bufptr = s;
+    if (!s)
+	s = oldbp;
+    else {
+	assert(s >= oldbp);
+	PL_bufptr = s;
+    }
     yywarn(Perl_form(aTHX_ "%s found where operator expected", what));
     if (is_first)
 	Perl_warn(aTHX_ "\t(Missing semicolon on previous line?)\n");
End of Patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant