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 257152 - was [Bug 256791 - failing SelectModelTestCase.testSelectModelGetFunctions on Ubuntu test machine]
Summary: was [Bug 256791 - failing SelectModelTestCase.testSelectModelGetFunctions on ...
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on: 256791
Blocks: 257866
  Show dependency tree
 
Reported: 2015-12-15 14:42 UTC by ilia
Modified: 2016-03-04 02:07 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Final patch (13.06 KB, patch)
2016-01-29 15:17 UTC, petrk
Details | Diff
Thread dump after about 1 hour of parsing (126.32 KB, text/plain)
2016-02-05 08:54 UTC, Alexander Simon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ilia 2015-12-15 14:42:13 UTC
See https://netbeans.org/bugzilla/show_bug.cgi?id=256791

<<

Fixing in releases:

304996 6e1b00e69e6b | petrk | 2015-12-09 17:22 +0300 | Fixing #256791 - failing SelectModelTestCase.testSelectModelGetFunctions on Ubuntu test machine
305073 67b8a35ad5ac | petrk | 2015-12-15 00:55 +0300 | Fixing #256791 - failing SelectModelTestCase.testSelectModelGetFunctions on Ubuntu test machine

This bug is partially fixed. I mark this one as fixed and open a new one.

>>
Comment 1 Alexander Simon 2015-12-16 09:00:25 UTC
No test case to reproduce the original bug.
Hope that NPE was fixed.
Comment 2 Alexander Simon 2015-12-16 09:01:21 UTC
Sorry, ignore previous comment.
Comment 3 Quality Engineering 2015-12-22 02:27:43 UTC
Integrated into 'main-silver', will be available in build *201512220002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/aa98a7b66f14
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Fixing #257152 - was [Bug 256791 - failing SelectModelTestCase.testSelectModelGetFunctions on Ubuntu test machine]
(transplanted from 981e71e3b94fe8df437ba1c168d4c5e9397dc718)
Comment 5 Quality Engineering 2016-01-28 02:34:41 UTC
Integrated into 'main-silver', will be available in build *201601280002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f0eb0bdd5d93
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Fixed #257152 - was [Bug 256791 - failing SelectModelTestCase.testSelectModelGetFunctions on Ubuntu test machine]
-- improved parser recovery
(transplanted from d8bc693d534dfab3b9fbb2eb5f030966518633be)
Comment 6 Quality Engineering 2016-01-29 02:37:01 UTC
Integrated into 'main-silver', will be available in build *201601290002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/8cdd1008a08e
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Additional fix for #257152 - was [Bug 256791 - failing SelectModelTestCase.testSelectModelGetFunctions on Ubuntu test machine]
-- added simple recovery for C
(transplanted from 437517a2ae8804b2f2eb3a2a243c1120331f0caf)
Comment 7 petrk 2016-01-29 15:17:33 UTC
Created attachment 158293 [details]
Final patch
Comment 8 Vladimir Voskresensky 2016-02-01 16:09:41 UTC
We need to integrate this into 8.1 after all tests pass on our private build/test servers
Comment 9 Vladimir Voskresensky 2016-02-01 17:29:58 UTC
at enum
305926:1f9a0f817162 [release81]
Comment 10 Alexander Simon 2016-02-02 13:07:24 UTC
Minimal test case with zero declarations:
===========8<===============
__BEGIN_NAMESPACE_STD

extern FILE *tmpfile (void) __wur;
===========8<===============

when __BEGIN_NAMESPACE_STD is absent then tmpfile is declared
Comment 11 Vladimir Voskresensky 2016-02-02 13:25:12 UTC
extra fix
305938:84dfd62eded4 [release81]
Comment 12 Vladimir Voskresensky 2016-02-04 08:55:01 UTC
v.
Comment 14 Quality Engineering 2016-02-05 02:38:04 UTC
Integrated into 'main-silver', will be available in build *201602050002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/74ee6ad1ca39
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #257152 - was [Bug 256791 - failing SelectModelTestCase.testSelectModelGetFunctions on Ubuntu test machine] (with PetrK)
- recovery for C and C++ languages which doesn't break K&R support in C++ files
(transplanted from 1f9a0f817162b9f9de54decbf755f9a57cc1c1c6)
Comment 15 Alexander Simon 2016-02-05 08:14:25 UTC
It seems the fix is not safe.
I got an infinite parsing with stack:
	at org.netbeans.modules.cnd.modelimpl.parser.generated.CPPParser.function_K_R_parameter_g(CPPParser.java:45431)
	at org.netbeans.modules.cnd.modelimpl.parser.generated.CPPParser.function_K_R_parameter_list_g(CPPParser.java:39010)
	at org.netbeans.modules.cnd.modelimpl.parser.generated.CPPParser.unknown_postfunction_declarator_specifiers_g(CPPParser.java:51557)
	at org.netbeans.modules.cnd.modelimpl.parser.generated.CPPParser.function_like_var_declarator_g(CPPParser.java:42650)
	at org.netbeans.modules.cnd.modelimpl.parser.generated.CPPParser.direct_declarator_g(CPPParser.java:47949)
	at org.netbeans.modules.cnd.modelimpl.parser.generated.CPPParser.declarator_g(CPPParser.java:40517)
	at org.netbeans.modules.cnd.modelimpl.parser.generated.CPPParser.init_declarator_g(CPPParser.java:48974)
	at org.netbeans.modules.cnd.modelimpl.parser.generated.CPPParser.init_declarator_list_g(CPPParser.java:40753)
	at org.netbeans.modules.cnd.modelimpl.parser.generated.CPPParser.declaration_g(CPPParser.java:39356)
	at org.netbeans.modules.cnd.modelimpl.parser.generated.CPPParser.function_K_R_parameter_g(CPPParser.java:45431)
	at org.netbeans.modules.cnd.modelimpl.parser.generated.CPPParser.function_K_R_parameter_list_g(CPPParser.java:39010)
Comment 16 Alexander Simon 2016-02-05 08:22:15 UTC
I'd prefer to rollback all changes in grammar. It do not looks a safe.Especially:     1.7  unknown_postfunction_declarator_specifiers     1.8      {String s
Comment 17 Alexander Simon 2016-02-05 08:27:08 UTC
(In reply to Alexander Simon from comment #16)
> I'd prefer to rollback all changes in grammar. It do not looks a
> safe.Especially:     1.7  unknown_postfunction_declarator_specifiers     1.8
> {String s
I mean change set:
http://hg.netbeans.org/main-silver/rev/f0eb0bdd5d93
that introduced greedy function unknown_postfunction_declarator_specifiers
Comment 18 Alexander Simon 2016-02-05 08:54:12 UTC
Created attachment 158386 [details]
Thread dump after about 1 hour of parsing
Comment 19 Vladimir Voskresensky 2016-02-05 09:30:34 UTC
I agree to rollback all changes in grammar made for this issue
Comment 20 Vladimir Voskresensky 2016-02-05 12:05:15 UTC
at enum: 305999:d94593afaea8 [release81]
Comment 21 Jiri Kovalsky 2016-02-05 12:48:00 UTC
Vladimir, https://hg.netbeans.org/releases/log/d94593afaea8 does not exist. Can you please explain what you meant by your last comment?
Comment 22 Vladimir Voskresensky 2016-02-05 13:04:33 UTC
It is "at enum" - our build server where we are running all tests, when they are passed, change will propagate into releases.
That's why I've removed 81patch1-fixed as well
Comment 23 Alexander Simon 2016-02-05 13:09:51 UTC
Do not see parsing problem any more.
Checked build from enum.
Comment 24 Vladimir Voskresensky 2016-02-05 17:10:49 UTC
pushed to release
http://hg.netbeans.org/releases/rev/d94593afaea8
Comment 25 Quality Engineering 2016-02-06 03:32:36 UTC
Integrated into 'main-silver', will be available in build *201602060002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e20c7343289f
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #257152 - was [Bug 256791 - failing SelectModelTestCase.testSelectModelGetFunctions on Ubuntu test machine]
- rollback changes in grammar and mark tests as @Ignore
(transplanted from d94593afaea86b2adde8446d512915321979e1a1)
Comment 26 petrk 2016-02-08 12:08:07 UTC
v.
Comment 27 Quality Engineering 2016-03-04 02:07:34 UTC
Integrated into 'main-silver', will be available in build *201603040002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/34efd66cc693
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: extra fix for #257152 - was [Bug 256791 - failing SelectModelTestCase.testSelectModelGetFunctions on Ubuntu test machine] (with PetrK)
- don't use system specific include paths (it makes tests unstable on some test machines)