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.
I'm investigating failed test: cnd-test-solaris10.x86/11757/testReport/org.netbeans.modules.cnd.repository.impl/ReopenRepositoryValidationFinal/testRepository/ It failed with difference in states of the file sqlite-autoconf-3071700/sqlite3.c Difference in last two segments of the states: ...[4953391-4966886][4967555-4973714] ...[4953391-4966887][4967556-4973715] Converted offset to line:column: ...[139724:56/4953391-140191:1/4966886][140209:57/4967555-140453:40/4973714] ...[139724:56/4953391-140192:1/4966887][140210: 1/4967556-140454: 1/4973715] As you can see the offset in second line is wrong (offset is increased on +1). I hardly believe in error in hardware/cache. It looks like code model preprocessor gets wrong offset of dead segments. Code fragment with offsets in square parenthesis: #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_ICU)[139724:56/4953391] ... #endif [140191:1/4966886] [140192:1/4966887]#endif ... #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)[140209:57/4967555] [140210:1/4967556]#ifdef SQLITE_ENABLE_ICU ... #endif /* defined(SQLITE_ENABLE_ICU) */[140453:40/4973714] [140454:1/4973715]#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ ...
problem is also reproduced in the build 11760
additional investigation: I reproduced bug on my computer. #cat ./testRepository/ModelBuiltFromRepository.out | grep "3190-3210" has 1 line ends on [4967556-4973715] (wrong) #cat ./testRepository-1/ModelBuiltFromRepository.out | grep "3190-3210" has 2 lines ends on [4967555-4973714] (right) and [4967556-4973715] (wrong) Indeed sqlite3.c is included from tea/generic/tclsqlite3.c: #ifdef USE_SYSTEM_SQLITE # include <sqlite3.h> #else #include "../../sqlite3.c" #endif I.e. first golden parse produced wrong ppstate, second parse produced right and wrong ppstate. I hope it help.
Integrated into 'main-silver', will be available in build *201509180002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/b2b9455a1b6a User: Vladimir Kvashin <vkvashin@netbeans.org> Log: trying to localize iz #255337 - [newcodemodel] preprocessor states differ on 1
Integrated into 'main-silver', will be available in build *201509190002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/7121a799ed9b User: Alexander Simon <alexvsimon@netbeans.org> Log: fixed Bug #250075 Finishing interrupted parsing produces broken code model - work around blocker Bug #255337 [newcodemodel] preprocessor states differ on 1 It seems new code model do not use file owner query and always assume UTF-8 encoding. Provide default owner query for test which returns UTF-8
Fixed via changing FileSystem to ClankFileObjectBasedFileSystem