non existing word found by MC

Robert Brenstein rjb at robelko.com
Sat Mar 19 19:55:46 EST 2005


>I just discovered a truly bizarre glitch that it took me loooong 
>time to nail down. It was just something so unexpected that I kept 
>overlooking it.
>
>I have a text that is dynamically assembled from extracting data 
>from database queries. At the end, I check whether anywhere along 
>the way a SQL error was reported. When that happens, the error 
>message is in the output string, so I simply do
>
>if "error" is among words of lst then
>
>which gives me a false positive in 1 case (no problem for 95 other 
>cases). Really unbelievable but if I look at the text itself, there 
>is NO 'error' in it. I confirm this direct observation by
>
>answer wordOffset("error",lst) & slash & (the number of words of lst)
>
>I get: 17/15
>
>This is with 2.6.1 engine (OS9). For now, I supplemented my test to 
>skip over this bogus result if word offset is bigger than number of 
>words, but this should not be happening.
>
>Has anyone seen anything like this? It surely looks that engine is 
>checking beyond the string boundary.
>
>Robert Brenstein

I just tried my program with 2.5 and 2.6 engines on OS 9.2.2 and 
2.6.1 engine on OSX 10.2.8 and get the same result in each case.

Regardless of the engine version, there are either 1 or 2 instances 
(out of 96 total) that give this bogus result. The original data 
pulled from the database is always exactly the same, only the script 
that handles the data changes as I add or change code to handle 
additional parameters when producing a report.

The bogus result pops for different instances and different word 
offsets/counts as I make any more substantial changes to script. This 
is, well, sort of reasonable: code changes change what is where in 
memory. However, the problem occurs for the same instances on both 
OS9 and OSX for the same stack code.

Robert


More information about the metacard mailing list