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 149457 - console output:trying to write non-writable typedef
Summary: console output:trying to write non-writable typedef
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: Sun All
: P2 blocker (vote)
Assignee: Alexander Simon
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2008-10-08 08:25 UTC by Alexander Simon
Modified: 2008-10-14 05:59 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 Alexander Simon 2008-10-08 08:25:02 UTC
Remove console message:
trying to write non-writable typedef:FileImpl @1838746662 /home/as204739/NetBeansProjects/Application_5/newfile.cTYPEDEF
Pkg[199-202]
typedef doesn't have container at all
Test case is:
---------------------------
struct _link_ {
};
    
void findiop(void) {
    typedef union {
        struct {
            struct _link_ hdr;
        } Pkgn;
        struct {
            struct _link_ hdr;
        } Pkgr;
    } Pkg;
    Pkg *pkgp;
}
---------------------------
Comment 1 Alexander Simon 2008-10-08 12:05:40 UTC
Problem in typedef that defined in function body.
Two bags:
- this typedef registered in the project
- typedef is saved in repository
- if user changed file a lot of different typedefs are stored in the repository and are not removed. So repository size
grows up.
Comment 2 Alexander Simon 2008-10-08 12:16:19 UTC
fixed in release65_cnd_freeze branch, chang eset:
http://elif.russia.sun.com/hg/release65_cnd_freeze/rev/5bdc16e36682
Please, review fix
Comment 3 Vladimir Kvashin 2008-10-08 17:59:19 UTC
I reviewed the fix.
I confirm that it is correct and safe.
Comment 4 Vladimir Kvashin 2008-10-08 17:59:52 UTC
QA, please test the fix in release65_cnd_freeze.
Comment 5 soldatov 2008-10-09 09:47:50 UTC
verified in build from endif
Comment 6 Alexander Simon 2008-10-09 10:47:07 UTC
fixed in main trunk, change set:
http://hg.netbeans.org/main/rev/d6a936b240a4
Comment 7 Quality Engineering 2008-10-09 18:05:03 UTC
Integrated into 'main-golden', will be available in build *200810091401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/d6a936b240a4
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed: IZ#149457:console output:trying to write non-writable typedef
Comment 8 soldatov 2008-10-10 13:14:23 UTC
Such regression appeared after this patch:

void unix_parse_conf_file()
{
  typedef struct { const char *label; const int value; } Section;
  const Section sections[] =
  {
    { ""                   , 1 },
    { "[File I/O Security]", 2 },
    { "[Shellout Security]", 3 },
    { "[Permitted Paths]"  , 4 }
  };
  int i = sections[0].value; // <-- 'value' is highlighted as invalid identifier
}
Comment 9 Alexander Simon 2008-10-10 13:52:00 UTC
fixed regression in release65_cnd_freeze, change set:
http://elif.russia.sun.com/hg/release65_cnd_freeze/rev/5aecf83304a9
Please, review fix
Comment 10 Alexey Vladykin 2008-10-10 14:22:06 UTC
I'm OK with this fix. BTW, a similar fix may be needed for CSM_ENUM_DECLARATION as well.
Comment 11 soldatov 2008-10-13 07:40:31 UTC
verified in build from endif
Comment 12 Alexander Simon 2008-10-13 07:48:11 UTC
fixed in main trunk, change set:
http://hg.netbeans.org/main/rev/fb738e1e7a79
Comment 13 Quality Engineering 2008-10-14 05:59:54 UTC
Integrated into 'main-golden', will be available in build *200810140201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/fb738e1e7a79
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed: IZ#149457:console output:trying to write non-writable typedef
- fix regression