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 77433 - *Code Model* OOM exception while parse sql_acl.cc
Summary: *Code Model* OOM exception while parse sql_acl.cc
Status: CLOSED 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-06-06 12:55 UTC by Vladimir Voskresensky
Modified: 2010-02-01 10:20 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 Vladimir Voskresensky 2006-06-06 12:55:08 UTC
./tracemodel.sh -f -Idwarf/mysql-5.0.18/include  dwarf/mysql-5.0.18/sql/sql_acl.cc
gives OOM
Comment 1 Vladimir Voskresensky 2006-06-06 13:13:00 UTC
The problem is with file .\include\my_sys.h (lines 324-331)
typedef struct st_my_tmpdir
{
  char **list;
  uint cur, max;
#ifdef THREAD
  pthread_mutex_t mutex;
#endif
} MY_TMPDIR;

something wrong with include directories => "max" was defined as macros and
wasn't undefined (#undef max is in file ./ndb/src/kernel/blocks/dbtux/Dbtux.hpp)
=> may be trying to expand macros looks for balanced "(" and ")" and failed on this.
Comment 2 Vladimir Voskresensky 2006-06-06 15:45:45 UTC
The problem is following:
there is in system:
#define bcopy(src,dst,len) memcpy((dst),(src),(len))
#define memcpy(dst,src,len) bcopy((src),(dst),(len)) 
in code we have:
memcpy(dst, buffer, 10)

This cause infinite re expanding of macros: memcpy->bcopy->memcpy and so on.

Comment 3 Vladimir Voskresensky 2006-06-06 18:28:29 UTC
fixed.
Updated callback/callbackimpl
Updated lexer and macroExpander