Support Requests item #2407218, was opened at 2008-12-08 18:52 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=616201&aid=2407218&group_id=96864
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: YYFill bounds checking insufficient Initial Comment: Looking at the generated code from re2c's examples directory, re2c calls YYFILL(n) with an n value of at least the size of the longest possible match. e.g. /*!re2c "a" { return 0; } "b"{6} { return 1; } */ will generate: if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6); If we use this value to check for end of buffer, re2c will quit before matching "a" if it is in the last 5 characters of the buffer. If we do not check this value, the generated code will exceed the buffer limits if it matches 'b' in the last 5 characters, as there's no check against YYLIMIT until another 6 bs are consumed. It seems to me that re2c cannot generate a correct solution without an EOF sentinel? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=616201&aid=2407218&group_id=96864 ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Re2c-general mailing list Re2c-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/re2c-general