Return to Home
  View the contents of your Cart View cart  
  0 item(s) in cart  
  Checkout  

Gimpel Software - Discussion Forum
Discussion Forum
We invite you to use this forum to communicate with other PC-lint and FlexeLint users. You do not need to log in to post a message. WARNING: Your email address will not be encrypted. We recommend that you obfuscate it as protection from web crawlers. To receive technical support directly from Gimpel Software, please follow the guidelines at http://www.gimpel.com/html/support.htm
Gimpel Software - Discussion Forum
Subject From Date & Time
Cannt spot out of bounds Adrian Stares November 08, 2016
4:33:43 AM
  Re: Cannt spot out of bounds November 08, 2016
5:57:29 AM
          Re: Cannt spot out of bounds Adrian Stares November 08, 2016
9:30:50 AM
                  Re: Cannt spot out of bounds November 08, 2016
10:08:34 AM
                          Re: Cannt spot out of bounds November 09, 2016
4:51:52 AM
 
Subject: Cannt spot out of bounds
Date: November 08, 2016
4:33:43 AM
Name: Adrian Stares
Email: astares AT servomex DOT com
Message:
Anybody know why pc-lint misses the obvious out of 
bounds in the following snippet?

Thanks in advance,

Adrian.

// snippet
void main(void)
{
    int array[4];
    int index = 0;
    for (int loop = 0; loop < 10; ++loop)
    {
        array[index] = loop;
        ++index;

        array[index] = loop;
        ++index;
    }
    array[0] = array[1];
}
Reply to this Message! Previous Message Next Message
 
Subject: Re: Cannt spot out of bounds
Date: November 08, 2016
5:57:29 AM
Message:
I am afraid that is one level of indirection too
much for the current value tracker.
Currently, it can only spot array[loop].
You could make an improvement request here:
http://support.gimpel.com/forums/225702-general
Or you wait for PC-LINT Plus, which has a revised
value tracker and test again.
Reply to this Message! Previous Message Next Message
 
Subject: Re: Cannt spot out of bounds
Date: November 08, 2016
9:30:50 AM
Name: Adrian Stares
Email: astares AT servomex DOT com
Message:
Thank you for your quick response.
I am looking forward to trying PC-LINT Plus. I hope 
it isn't too much longer as the company is looking 
at other tools now :-(
Reply to this Message! Previous Message Next Message
 
Subject: Re: Cannt spot out of bounds
Date: November 08, 2016
10:08:34 AM
Message:
The latest LintPlus beta (8c) also does not flag
this as OOB.
Reply to this Message! Previous Message Next Message
 
Subject: Re: Cannt spot out of bounds
Date: November 09, 2016
4:51:52 AM
Message:
Thanks for trying, posted an improvement request
using the OP.
Reply to this Message! Previous Message Next Message