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 79848 - *Code Model* parsing exception at unsigneg long 18446744073709551615
Summary: *Code Model* parsing exception at unsigneg long 18446744073709551615
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-07 08:09 UTC by stuav
Modified: 2008-06-18 15:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
netbeans 5.5b log file (20.43 KB, application/octet-stream)
2006-07-07 08:10 UTC, stuav
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stuav 2006-07-07 08:09:36 UTC
Hi i find at parsing process. I use cnd-060615-linux.bin +
netbeans-5_5-beta-linux.bin.

As i can understand exception appeared at parsing 
#    if ULONG_MAX == 18446744073709551615

java dont understand number 18446744073709551615, or 18446744073709551615UL

ps: it is not my code, it from BOOST library.
Comment 1 stuav 2006-07-07 08:10:40 UTC
Created attachment 31682 [details]
netbeans 5.5b log file
Comment 2 Vladimir Voskresensky 2006-07-07 21:34:55 UTC
problem reproduced.
Comment 3 Vladimir Voskresensky 2006-07-25 14:34:18 UTC
For Number exception we should check correctly strings, but for now:
 - workaround. Use Long.MAX_VALUE for overflow values.
Comment 4 Vladimir Kvashin 2006-11-01 09:53:40 UTC
The problem occurs when 64-bit integer value appears in preprocessor conditional
directive. Java integer data types aren't large enough to store such values.

No exception is thrown.

The remaining problem is that some conditionals might be evaluated incorrectly
and thus incorrect conditional branch would be parsed. The given example from
boost works as it should.

The example that doesn't work correct is:

#if __LONG_LONG_MAX__ < 18446744073709551615
void foo32() {
}
#else
void foo64() {
}
#endif

On 32-bit system, it should contain foo32().
Now code model reports foo64().
Comment 5 Jesse Grodnik 2008-05-08 17:16:39 UTC
Escalated to P2
Comment 6 Vladimir Voskresensky 2008-06-18 15:09:29 UTC
The original problem is resolved.
For boost with example like
#if __LONG_LONG_MAX__ == 18446744073709551615
void foo64() {
}
#else
void foo32() {
}
#endif

no any exception and platform is detected correctly

Comment 7 Vladimir Voskresensky 2008-06-18 15:10:33 UTC
the testcase of vkvashin is handled in http://www.netbeans.org/issues/show_bug.cgi?id=137578