/ Check-in [d537aa5e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Additional memory initialization in lemon - bug reported from wireshark. Ticket #2172. Note this problem only comes up with certain grammars, and does not impact SQLite. On the other hand, it might cause SQLite to run slower. So we might want to revisit this change at some point. (CVS 3594)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d537aa5edecb5c7b84d8eb876453f385f6f3d91a
User & Date: drh 2007-01-16 18:19:13
Context
2007-01-19
01:06
Make sure the IS NULL optimization introduced by check-in (3494) correctly handles a LEFT JOIN where the a term from the right table of the join uses an IS NULL constraint. Ticket #2177. This check-in also adds the new test cases that were suppose to have been added with (3494) but which were mistakenly omitted. (CVS 3595) check-in: 335863e4 user: drh tags: trunk
2007-01-16
18:19
Additional memory initialization in lemon - bug reported from wireshark. Ticket #2172. Note this problem only comes up with certain grammars, and does not impact SQLite. On the other hand, it might cause SQLite to run slower. So we might want to revisit this change at some point. (CVS 3594) check-in: d537aa5e user: drh tags: trunk
03:09
Make sure the parser generated by lemon always calls destructors on unused symbols, even if there is no action following the rule. Ticket #2171. (CVS 3593) check-in: 0c5c1b93 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to tool/lempar.c.

   472    472     if( yyTraceFILE && yyruleno>=0 
   473    473           && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
   474    474       fprintf(yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
   475    475         yyRuleName[yyruleno]);
   476    476     }
   477    477   #endif /* NDEBUG */
   478    478   
   479         -#ifndef NDEBUG
   480    479     /* Silence complaints from purify about yygotominor being uninitialized
   481    480     ** in some cases when it is copied into the stack after the following
   482    481     ** switch.  yygotominor is uninitialized when a rule reduces that does
   483    482     ** not set the value of its left-hand side nonterminal.  Leaving the
   484    483     ** value of the nonterminal uninitialized is utterly harmless as long
   485    484     ** as the value is never used.  So really the only thing this code
   486    485     ** accomplishes is to quieten purify.  
          486  +  **
          487  +  ** 2007-01-16:  The wireshark project (www.wireshark.org) reports that
          488  +  ** without this code, their parser segfaults.  I'm not sure what there
          489  +  ** parser is doing to make this happen.  This is the second bug report
          490  +  ** from wireshark this week.  Clearly they are stressing Lemon in ways
          491  +  ** that it has not been previously stressed...  (SQLite ticket #2172)
   487    492     */
   488    493     memset(&yygotominor, 0, sizeof(yygotominor));
   489         -#endif
          494  +
   490    495   
   491    496     switch( yyruleno ){
   492    497     /* Beginning here are the reduction cases.  A typical example
   493    498     ** follows:
   494    499     **   case 0:
   495    500     **  #line <lineno> <grammarfile>
   496    501     **     { ... }           // User supplied code