I'm experiencing a core dump when macroizing a portion of a DX
network. DXUI writes the macro successfully, but then saving the modified
network yields a SEGV before it completes.
Running a purified dxui executable yields no errors except a few FMMs
before the core dump. Those FMMs occur while saving the modified network.
I'd sure appreciate it if someone who knows DX internals could take a
quick glance and give me your impression.
Thanks,
Randall Hopper
==============================================================================
dbx
==============================================================================
> dbx ~/software/dx-4.1.0/dx/bin_sgi/dxui core
dbx version 7.3 60152_Nov12 patchSG0003765 Nov 12 1999 02:43:21
Elf 32 File Header in core file does not match executable/dso
/usr/local/lib32/libjpeg.so (elf header e_entry mismatch) (use of the core file
may be misleading!)
Core from signal SIGSEGV: Segmentation violation
---------------------------------------------------------------------------
(dbx) where
> 0 List::getElement(int)(this = <no such address>, position = <no such
> address>) ["/scratch/ethyl/rhh/BUILD/dx-4.1.0/src/uipp/base/List.C":95,
> 0x10331a54]
1 Node::isIOConnected(List*,int)(this = 0x107f9380, io = 0x107f93a4, index =
1) ["/scratch/ethyl/rhh/BUILD/dx-4.1.0/src/uipp/dxui/Node.C":1987, 0x100cbd84]
2 Node::isInputConnected(int)(this = 0x107f9380, index = 1)
["/scratch/ethyl/rhh/BUILD/dx-4.1.0/src/uipp/dxui/Node.h":750, 0x101946e4]
3 Network::visitNodes(Node*)(this = 0x104c6558, n = 0x107f9380)
["/scratch/ethyl/rhh/BUILD/dx-4.1.0/src/uipp/dxuilib/Network.C":4292,
0x1017d3e8]
4 Network::visitNodes(Node*)(this = 0x104c6558, n = 0x107f9478)
["/scratch/ethyl/rhh/BUILD/dx-4.1.0/src/uipp/dxuilib/Network.C":4308,
0x1017d4a4]
5 Network::visitNodes(Node*)(this = 0x104c6558, n = 0x10a21ac8)
["/scratch/ethyl/rhh/BUILD/dx-4.1.0/src/uipp/dxuilib/Network.C":4308,
0x1017d4a4]
6 Network::visitNodes(Node*)(this = 0x104c6558, n = 0x105efaf8)
["/scratch/ethyl/rhh/BUILD/dx-4.1.0/src/uipp/dxuilib/Network.C":4308,
0x1017d4a4]
...
...
... 93 more frames that look exactly like #6 ("4308, 0x1017d4a4") ...
...
...
---------------------------------------------------------------------------
(dbx) down
List::getElement: 95 {
(dbx) down
not that many levels
---------------------------------------------------------------------------
(dbx) list 90
90 }
91 }
92
93
94 const void* List::getElement(const int position)
* 95 {
96 Link* link;
97 int i;
98
99 ASSERT(this);
---------------------------------------------------------------------------
(dbx) up
Node::isIOConnected:1987 p = (Parameter*)io->getElement(index);
---------------------------------------------------------------------------
(dbx) list 1981,1991
> 1981 boolean Node::isIOConnected(List *io, int index)
1982 {
1983
1984 Parameter *p;
1985 ASSERT( index >= 1 );
1986
*1987 p = (Parameter*)io->getElement(index);
1988 ASSERT(p);
1989
1990 return p->isConnected();
1991 }
---------------------------------------------------------------------------
(dbx) up
Node::isIOConnected:1987 p = (Parameter*)io->getElement(index);
---------------------------------------------------------------------------
(dbx) print index
1
---------------------------------------------------------------------------
(dbx) print *io
class List {
first = 0x107f89f0
last = 0x107f89f0
size = 1
}
---------------------------------------------------------------------------
(dbx) print *io->first
class Link {
element = 0x107f9408
next = (nil)
}
==============================================================================
purify
==============================================================================
**** Purify instrumented /home/rhh/software/dx/dx/bin_sgi/dxui (pid 1238340 at
Wed Apr 26 14:53:16 2000)
* Purify 4.1 IRIX6, Copyright (C) 1992-1997 Rational Software Corp. All
rights reserved.
* For contact information type: "purify -help"
* Command-line: /home/rhh/software/dx/dx/bin_sgi/dxui -edit -memory 64 \
-program DXDriver.net -directory \
/home/rhh/lm/00-37/DX-PERF_2.2_2-2/WORK/Models3/networks
* Options settings: -logfile=/home/rhh/%V.pureout.%p \
-copy-fd-output-to-logfile=1,2 -chain-length=20 -max-threads=100 \
-show-pc=no -show-pc-offset=yes -output-limit=40000000 \
-thread-stack-change=0x2000 -check-beyond-thread-stacks=no \
-jit-debug=error,ask -purify \
-purify-home=/software/supported/pure/purify-4.1-irix6
* Purify licensed to MARTIN MARIETTA or LOCKHEED MARTIN
* Purify checking enabled.
**** Purify instrumented /home/rhh/software/dx/dx/bin_sgi/dxui (pid 1238340)
****
FMM: Freeing mismatched memory:
* This is occurring while in:
_free+0x44 [malloc.c:993]
_realloc+0x48 [malloc.c:1119]
Network::netParseCommentComment(const char*)+0xfe58a1f8 [Network.C:2039]
Network::netParseComments(const char*,const char*,int)+0xfe589088
[Network.C:2301]
Network::parseComment(char*)+0xfe58613c [Network.C:2528]
ParseComment+0xfe5844a4 [Network.C:2502]
yyparse+0xfe6ee98c [net.yacc:370]
Network::parse(__file_s*)+0xfe58f2d0 [Network.C:1607]
Network::readNetwork(const char*,const char*,unsigned char)+0xfe59f808
[Network.C:1332]
MacroDefinition::loadNetworkBody(void)+0xfe458204
[MacroDefinition.C:154]
Network::getReferencedMacros(List*,List*)+0xfe58f07c [Network.C:6219]
Network::getReferencedMacros(List*,List*)+0xfe58f134 [Network.C:6221]
Network::getReferencedMacros(List*,List*)+0xfe58f134 [Network.C:6221]
Network::printMacroReferences(__file_s*,unsigned char,void
(*)(void*,char*),void*)+0xfe5909ac [Network.C:6269]
JavaNet::printMacroReferences(__file_s*,unsigned char,void
(*)(void*,char*),void*)+0xfe788704 [JavaNet.C:817]
Network::printHeader(__file_s*,PrintType,void
(*)(void*,char*),void*)+0xfe5995c4 [Network.C:3722]
Network::printNetwork(__file_s*,PrintType)+0xfe598654 [Network.C:3596]
Network::netPrintNetwork(const char*)+0xfe5a12ac [Network.C:3340]
Network::saveNetwork(const char*,unsigned char)+0xfe59da34
[Network.C:3182]
JavaNet::saveNetwork(const char*,unsigned char)+0xfe78ec10
[JavaNet.C:121]
* Attempting to free block at 0x116eadb0 in the heap.
* Address 0x116eadb0 is at the beginning of a malloc'd block of 268 bytes.
* This block was allocated from:
_malloc+0x4c [malloc.c:886]
operator new(unsigned int)+0xfe79140c [new.C:34]
operator new[](unsigned int)+0xffe0278c [array_new.cxx:30]
__nwa__GUi+0x44 [memtypes.c:141]
DuplicateString(const char*)+0xfe819aa4 [Strings.C:55]
Network::netParseCommentComment(const char*)+0xfe58a000 [Network.C:2035]
Network::netParseComments(const char*,const char*,int)+0xfe589088
[Network.C:2301]
Network::parseComment(char*)+0xfe58613c [Network.C:2528]
ParseComment+0xfe5844a4 [Network.C:2502]
yyparse+0xfe6ee98c [net.yacc:370]
Network::parse(__file_s*)+0xfe58f2d0 [Network.C:1607]
Network::readNetwork(const char*,const char*,unsigned char)+0xfe59f808
[Network.C:1332]
MacroDefinition::loadNetworkBody(void)+0xfe458204
[MacroDefinition.C:154]
Network::getReferencedMacros(List*,List*)+0xfe58f07c [Network.C:6219]
Network::getReferencedMacros(List*,List*)+0xfe58f134 [Network.C:6221]
Network::getReferencedMacros(List*,List*)+0xfe58f134 [Network.C:6221]
Network::printMacroReferences(__file_s*,unsigned char,void
(*)(void*,char*),void*)+0xfe5909ac [Network.C:6269]
JavaNet::printMacroReferences(__file_s*,unsigned char,void
(*)(void*,char*),void*)+0xfe788704 [JavaNet.C:817]
Network::printHeader(__file_s*,PrintType,void
(*)(void*,char*),void*)+0xfe5995c4 [Network.C:3722]
Network::printNetwork(__file_s*,PrintType)+0xfe598654 [Network.C:3596]
* This block of memory was obtained using an allocation routine which is
not compatible with the routine by which it is being freed.
**** Purify instrumented /home/rhh/software/dx/dx/bin_sgi/dxui (pid 1238340)
****
FMM: Freeing mismatched memory:
* This is occurring while in:
_free+0x44 [malloc.c:993]
_realloc+0x48 [malloc.c:1119]
Network::netParseCommentComment(const char*)+0xfe58a1f8 [Network.C:2039]
Network::netParseComments(const char*,const char*,int)+0xfe589088
[Network.C:2301]
Network::parseComment(char*)+0xfe58613c [Network.C:2528]
ParseComment+0xfe5844a4 [Network.C:2502]
yyparse+0xfe6ee98c [net.yacc:370]
Network::parse(__file_s*)+0xfe58f2d0 [Network.C:1607]
Network::readNetwork(const char*,const char*,unsigned char)+0xfe59f808
[Network.C:1332]
MacroDefinition::loadNetworkBody(void)+0xfe458204
[MacroDefinition.C:154]
Network::getReferencedMacros(List*,List*)+0xfe58f07c [Network.C:6219]
Network::printMacroReferences(__file_s*,unsigned char,void
(*)(void*,char*),void*)+0xfe5909ac [Network.C:6269]
JavaNet::printMacroReferences(__file_s*,unsigned char,void
(*)(void*,char*),void*)+0xfe788704 [JavaNet.C:817]
Network::printHeader(__file_s*,PrintType,void
(*)(void*,char*),void*)+0xfe5995c4 [Network.C:3722]
Network::printNetwork(__file_s*,PrintType)+0xfe598654 [Network.C:3596]
Network::netPrintNetwork(const char*)+0xfe5a12ac [Network.C:3340]
Network::saveNetwork(const char*,unsigned char)+0xfe59da34
[Network.C:3182]
JavaNet::saveNetwork(const char*,unsigned char)+0xfe78ec10
[JavaNet.C:121]
NoUndoNetworkCommand::doIt(CommandInterface*)+0xfe52095c
[NoUndoNetworkCommand.C:48]
Command::execute(CommandInterface*)+0xfe869fcc [Command.C:244]
* Attempting to free block at 0x1179e060 in the heap.
* Address 0x1179e060 is at the beginning of a malloc'd block of 42 bytes.
* This block was allocated from:
_malloc+0x4c [malloc.c:886]
operator new(unsigned int)+0xfe79140c [new.C:34]
operator new[](unsigned int)+0xffe0278c [array_new.cxx:30]
__nwa__GUi+0x44 [memtypes.c:141]
DuplicateString(const char*)+0xfe819aa4 [Strings.C:55]
Network::netParseCommentComment(const char*)+0xfe58a000 [Network.C:2035]
Network::netParseComments(const char*,const char*,int)+0xfe589088
[Network.C:2301]
Network::parseComment(char*)+0xfe58613c [Network.C:2528]
ParseComment+0xfe5844a4 [Network.C:2502]
yyparse+0xfe6ee98c [net.yacc:370]
Network::parse(__file_s*)+0xfe58f2d0 [Network.C:1607]
Network::readNetwork(const char*,const char*,unsigned char)+0xfe59f808
[Network.C:1332]
MacroDefinition::loadNetworkBody(void)+0xfe458204
[MacroDefinition.C:154]
Network::getReferencedMacros(List*,List*)+0xfe58f07c [Network.C:6219]
Network::printMacroReferences(__file_s*,unsigned char,void
(*)(void*,char*),void*)+0xfe5909ac [Network.C:6269]
JavaNet::printMacroReferences(__file_s*,unsigned char,void
(*)(void*,char*),void*)+0xfe788704 [JavaNet.C:817]
Network::printHeader(__file_s*,PrintType,void
(*)(void*,char*),void*)+0xfe5995c4 [Network.C:3722]
Network::printNetwork(__file_s*,PrintType)+0xfe598654 [Network.C:3596]
Network::netPrintNetwork(const char*)+0xfe5a12ac [Network.C:3340]
Network::saveNetwork(const char*,unsigned char)+0xfe59da34
[Network.C:3182]
* This block of memory was obtained using an allocation routine which is
not compatible with the routine by which it is being freed.
**** Purify instrumented /home/rhh/software/dx/dx/bin_sgi/dxui (pid 1238340)
****
COR: Fatal core dump:
* This is occurring while in:
List::getSize(void)+0xfe468230 [List.h:89]
Parameter::isConnected(void)+0xfe47f470 [Parameter.h:97]
Node::isIOConnected(List*,int)+0xfe469918 [Node.C:1990]
Node::isInputConnected(int)+0xfe5b6500 [Node.h:750]
Network::visitNodes(Node*)+0xfe58c294 [Network.C:4292]
Network::visitNodes(Node*)+0xfe58c4c4 [Network.C:4308]
Network::visitNodes(Node*)+0xfe58c4c4 [Network.C:4308]
Network::visitNodes(Node*)+0xfe58c4c4 [Network.C:4308]
Network::visitNodes(Node*)+0xfe58c4c4 [Network.C:4308]
Network::visitNodes(Node*)+0xfe58c4c4 [Network.C:4308]
Network::visitNodes(Node*)+0xfe58c4c4 [Network.C:4308]
Network::visitNodes(Node*)+0xfe58c4c4 [Network.C:4308]
Network::visitNodes(Node*)+0xfe58c4c4 [Network.C:4308]
Network::visitNodes(Node*)+0xfe58c4c4 [Network.C:4308]
Network::visitNodes(Node*)+0xfe58c4c4 [Network.C:4308]
Network::visitNodes(Node*)+0xfe58c4c4 [Network.C:4308]
Network::visitNodes(Node*)+0xfe58c4c4 [Network.C:4308]
Network::visitNodes(Node*)+0xfe58c4c4 [Network.C:4308]
Network::visitNodes(Node*)+0xfe58c4c4 [Network.C:4308]
Network::visitNodes(Node*)+0xfe58c4c4 [Network.C:4308]
* Received signal 11 (SIGSEGV - Segmentation fault)
* Handler function: SIG_DFL
* Faulting address = 0x5ffca738
* Signal mask: (SIGSEGV)
* Pending signals: