This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 214352 - "beyond Array Bounds Read" error in Freeway sample
Summary: "beyond Array Bounds Read" error in Freeway sample
Status: RESOLVED WONTFIX
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.2
Hardware: PC Solaris
: P3 normal (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-18 09:10 UTC by soldatov
Modified: 2012-06-18 10:47 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2012-06-18 09:10:13 UTC
Static code analyzer speaks about error at 198th line in traffic.cc:
ERROR: ABR beyond Array Bounds Read  lanes[__1fPtraffic_advance6F_v1BBj_+1] in traffic.cc with 7051 offset

original code:
List *upperlane = IsLowerLane(j) ? lanes[LowerToUpperLane(j)] : NULL;
code in macro expansion tab:
List *upperlane = (! (( j ) & 1) ) ? lanes[(( j )+1)] : 0;
Comment 1 Alexander Simon 2012-06-18 10:47:38 UTC
It's a false positive error.
To avoid this error select Tools->Options->Editor->Hints->C/C++ Source Files->Static Code Analyzer->Confidence = Sure.