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 122448 - arithmetic error "/ by zero" on resolving expression parsing boost
Summary: arithmetic error "/ by zero" on resolving expression parsing boost
Status: CLOSED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-21 00:40 UTC by Thomas Preisler
Modified: 2008-01-18 15:09 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 Thomas Preisler 2007-11-21 00:40:04 UTC
I don't know if it is serious, but I'm seeing many exception in the logfile when parsing boost using NB RC2 (SXDE):

...
SEVERE [org.netbeans.modules.cnd.apt]: line 20: warning: extra tokens at end of #undef directive
arithmetic error "/ by zero" on resolving expression
: ["0",<9>,line=25,col=6],offset=971,file=null ["&&",<160>,line=25,col=8],offset=973,file=null ["10",<10>,line=25,col=11],offset=976,file=null 
["/",<144>,line=25,col=14],offset=979,file=null ["0",<9>,line=25,col=16],offset=981,file=nullarithmetic error "/ by zero" on resolving expression
: ["not_defined",<199>,line=33,col=5],offset=1048,file=null ["&&",<160>,line=33,col=17],offset=1060,file=null 
["10",<10>,line=33,col=20],offset=1063,file=null ["/",<144>,line=33,col=23],offset=1066,file=null 
["not_defined",<199>,line=33,col=25],offset=1068,file=nullarithmetic error "/ by zero" on resolving expression
: ["MACRO_0",<199>,line=41,col=5],offset=1145,file=null ["&&",<160>,line=41,col=13],offset=1153,file=null 
["10",<10>,line=41,col=16],offset=1156,file=null ["/",<144>,line=41,col=19],offset=1159,file=null 
["MACRO_0",<199>,line=41,col=21],offset=1161,file=null [">",<143>,line=41,col=29],offset=1169,file=null 
["1",<10>,line=41,col=31],offset=1171,file=nullarithmetic error "/ by zero" on resolving expression
: ["MACRO_0",<199>,line=49,col=5],offset=1238,file=null ["?",<129>,line=49,col=13],offset=1246,file=null 
["10",<10>,line=49,col=15],offset=1248,file=null ["/",<144>,line=49,col=18],offset=1251,file=null 
["MACRO_0",<199>,line=49,col=20],offset=1253,file=null [":",<127>,line=49,col=28],offset=1261,file=null 
["0",<9>,line=49,col=30],offset=1263,file=nullarithmetic error "/ by zero" on resolving expression
: ["MACRO_0",<199>,line=57,col=5],offset=1330,file=null ["==",<138>,line=57,col=13],offset=1338,file=null 
["0",<9>,line=57,col=16],offset=1341,file=null ["||",<162>,line=57,col=18],offset=1343,file=null ["10",<10>,line=57,col=21],offset=1346,file=null 
["/",<144>,line=57,col=24],offset=1349,file=null ["MACRO_0",<199>,line=57,col=26],offset=1351,file=null 
[">",<143>,line=57,col=34],offset=1359,file=null ["1",<10>,line=57,col=36],offset=1361,file=nullline 68:29: expecting RPAREN, found '('
Comment 1 Vladimir Voskresensky 2007-11-21 06:17:52 UTC
Thanks, this is notification message and nothing is broken.
Boost library uses a lot of tricks to check the behavior of preprocessor in different boundary situations.
This is one of them.
I'll update message to more descriptive
Comment 2 Vladimir Voskresensky 2008-01-15 15:39:22 UTC
fixed:
- changed log level to warning from severe
- provide debug string instead of list of tokens

cvs log:
Checking in impl/structure/APTIfConditionBaseNode.java;
/shared/data/ccvs/repository/cnd/apt/src/org/netbeans/modules/cnd/apt/impl/structure/APTIfConditionBaseNode.java,v  <--
 APTIfConditionBaseNode.java
new revision: 1.9; previous revision: 1.8
done
Checking in impl/structure/APTMacroBaseNode.java;
/shared/data/ccvs/repository/cnd/apt/src/org/netbeans/modules/cnd/apt/impl/structure/APTMacroBaseNode.java,v  <-- 
APTMacroBaseNode.java
new revision: 1.7; previous revision: 1.6
done
Checking in utils/ListBasedTokenStream.java;
/shared/data/ccvs/repository/cnd/apt/src/org/netbeans/modules/cnd/apt/utils/ListBasedTokenStream.java,v  <-- 
ListBasedTokenStream.java
new revision: 1.8; previous revision: 1.7
done
Checking in utils/APTUtils.java;
/shared/data/ccvs/repository/cnd/apt/src/org/netbeans/modules/cnd/apt/utils/APTUtils.java,v  <--  APTUtils.java
new revision: 1.18; previous revision: 1.17
done
Checking in impl/support/APTMacroImpl.java;
/shared/data/ccvs/repository/cnd/apt/src/org/netbeans/modules/cnd/apt/impl/support/APTMacroImpl.java,v  <-- 
APTMacroImpl.java
new revision: 1.9; previous revision: 1.8
done

+ test
Checking in include_macro_expanding.cc.err;
/shared/data/ccvs/repository/cnd/modelimpl/test/unit/data/goldenfiles/org/netbeans/modules/cnd/modelimpl/trace/FileModelTest/include_macro_expanding.cc.err,v
 <--  include_macro_expanding.cc.err
new revision: 1.2; previous revision: 1.1
done