diff options
author | markj <markj@FreeBSD.org> | 2015-05-17 03:59:08 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2015-05-17 03:59:08 +0000 |
commit | 6274bab2e009cf82e38699b4aab88a79104cc438 (patch) | |
tree | bccbb67b959584019487a4c119135566313794b3 /cddl/contrib/opensolaris/lib/libdtrace | |
parent | 48547f12feb5b334a883310e8b56fc045ce292d8 (diff) | |
download | FreeBSD-src-6274bab2e009cf82e38699b4aab88a79104cc438.zip FreeBSD-src-6274bab2e009cf82e38699b4aab88a79104cc438.tar.gz |
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.
MFC after: 3 weeks
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libdtrace')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l index 925f8a5..192e1e2 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) #ifdef illumos yysptr = yysbuf; #endif + YY_FLUSH_BUFFER; } /* |