Fibre Parser can return garbage when switching between multiple files
|
|
Bugzilla Link |
745 |
Created on |
Sep 13, 2010 13:27 |
Resolution |
FIXED |
Resolved on |
Sep 21, 2010 01:20 |
Version |
svn |
OS |
All |
Architecture |
PC |
Extended Description
The Fibre parser in the standard library is non-reentrant. This means we shouldn't be surprised if FibreScan* calls ever give the wrong values when reading from multiple files. The lexer potentially caches data read ahead of the last FibreScan call which means the next call may incorrectly return data cached during the last call.
Switching to a reentrant parser should fix this.
http://www.usualcoding.eu/post/2007/09/03/Building-a-reentrant-parser-in-C-with-Flex/Bison