From f524c3384201c19567a4c1223b67ba886bdea6d7 Mon Sep 17 00:00:00 2001 From: markj Date: Sun, 7 Jun 2015 19:46:12 +0000 Subject: MFC r283025: As dtrace(1) processes D libraries under /usr/lib/dtrace, the compiler may return an error if one of the depends_on directives in a library is not satisfied. In this case, libdtrace is supposed to ignore the library and carry on. However, the remainder of the library may still be buffered by the lexer, causing libdtrace to erroneously continue processing it on the next call to yyparse(). Fix this by explicitly flushing the input buffer each time the compiler state is reset. --- cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l | 1 + 1 file changed, 1 insertion(+) (limited to 'cddl') diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l index 032d303..bd41171 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l @@ -743,6 +743,7 @@ yyinit(dt_pcb_t *pcb) #if defined(sun) yysptr = yysbuf; #endif + YY_FLUSH_BUFFER; } /* -- cgit v1.1