Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jun 2010 04:38:14 +0000 (UTC)
From:      Alexander Kabaev <kan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r209030 - head/cddl/contrib/opensolaris/lib/libdtrace/common
Message-ID:  <201006110438.o5B4cEdN067553@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kan
Date: Fri Jun 11 04:38:14 2010
New Revision: 209030
URL: http://svn.freebsd.org/changeset/base/209030

Log:
  In dtrace lexer, do not unput token if it is EOF.
  
  This is harmless with OpenSolaris fex and yacc, but with FreeBSD
  causes '\xff' symbol to be physically put into input buffer, causing
  subsequent syntax error.
  
  MFC after: 1 week

Modified:
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l

Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l	Fri Jun 11 03:54:00 2010	(r209029)
+++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l	Fri Jun 11 04:38:14 2010	(r209030)
@@ -811,7 +811,8 @@ id_or_type(const char *s)
 			longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM);
 	}
 
-	unput(c0);
+	if (c0 != EOF)
+		unput(c0);
 	return (ttok);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006110438.o5B4cEdN067553>