Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Applied [HEAD & 1_1] RE: [cdt-patch] Scanner bug fixes and a new automated test

 
-----Original Message-----
From: Niefer, Andrew [mailto:aniefer@xxxxxxxxxxxx]
Sent: Thursday, April 24, 2003 2:32 PM
To: 'cdt-patch@xxxxxxxxxxx'
Subject: [cdt-patch] Scanner bug fixes and a new automated test

This patch is against the 1_1 branch.
 
This patch fixes 2 scanner bugs:
   Bug36816 Scanner infinite loop on incomplete #include
   Bug36255 Parser hangs/goes infinite
 
This patch also introduces a new automated test, FractionalAutomatedTest, which tests the parser on incomplete files.  This test behaves in the same manner as AutomatedTest with regard to a FractionalAutomatedTest.properties file.  In addition to the same properties as Automated test, there are 3 new ones:
stepSize = <integer value> (default is 50)
windowSize = <integer value> (default is 200)
tempFile = <file name>   (default is "", no tempFile)
The Fractional test works by reading in stepSize bytes at a time from the source file and parsing that partial file. Once the entire file is loaded by reading and parsing in stepSize increments, starting at the begining of the file windowSize chunks of code are removed and the rest of it is parsed.  This window of removed code is then advanced by stepSize increments, parsing each version of the file, until the window reaches the end of the file.
 
If a tempFile is specified, then before each parse, the code about to be parsed is saved to that file.  This is because the whole idea of the fractional test is to try to find infinite loops.  If an infinite loop is found, then the tempFile and be looked at to try and determine the cause.
 
This is the first pass, a future version might use a seperate thread to parse the files so that infinite loops can be detected and the test failed instead of the test just hanging.
 
-Andrew
 
 
 

Back to the top