0.7.1 shipped with egcs-1.0.2, which corresponds with:
gcc version egcs-2.90.27 980315 (egcs-1.0.2 release)
I was able to build an internal development version with egcs-1.1
(19980901) under NT, but I have not tried it under Solaris yet.
I don't know why, but someone at Sun decided that if strlen() gets a
null pointer, then the entire process should crash. I guess they felt
that the performance hit of testing for null pointers was too great.
I'm not sure I agree with this. I'm not sure, but I vaguely remember
that this was a change, and that passing NULL to strlen did not cause
problems in SunOS4.x
In any case, ACS is a fairly young domain, and we made changes to
ptlang to support ACS. The rest of ptlang has not changed very much,
so it likely that we introduced an ACS/ptlang bug.
Running gdb is the right thing to do. When the segfault happens, you
should type 'bt' so that we can get a stack trace and see where the
error occurred. If you get a backtrace, send it to me, and I'll see
if I can make heads or tails out of it. You can use 'up' and 'down'
to traverse the stack and see what source code lines were called.
In the interim, I'll rebuild my internal tree to use egcs-1.1 and see
if I can replicate the bug. If I can't, you may need to install the
older version of egcs that we have on our website with the 0.7.1
sources, or try to upgrade to egcs-1.1, which could cause other
problems.
-Christopher
--------
Hi,
I was able to obtain the pt 0.7.1 package from ptolemy.eecs.berkeley.edu
and succeed in building most of the available tools. There is one
problem
that I hope someone can help me out with. The platform is Solaris 2.5.1
using the latest version of egcs (19980803), flex, and bison.
Looking at the log file, I found that the commands
"$SRC/bin.sol2.5/ptlang $SRC/src/domains/acs/stars/ACSAdd.pl"
"$SRC/bin.sol2.5/ptlang $SRC/src/domains/acs/stars/ACSPrinter.pl"
generated "Segmentation Fault". The ptlang command has no problem
parsing the other .pl files like ACSAdd.pl, ACSGain.pl,
ACSPrinterFixSim.pl, and ACSAddFPCGC.pl. I ran
"gdb $SRC/bin.sol2.5/ptlang $SRC/src/domains/acs/stars/ACSAdd.pl"
and got the following results:
(gdb) r ACSPrinter.pl
Starting program: /a/ptolemy/obj.sol2.5/ptlang/ptlang ACSPrinter.pl
Breakpoint 1, main (argc=2, argv=0xeffffb04) at
../../src/ptlang/ptlang.y:2609
2609 if (argc < 2 || argc > 3) {
(gdb) n
2613 if (argc == 3) {
(gdb) n
2622 inputFile = argv[1];
(gdb) n
2624 if ((yyin = fopen (inputFile, "r")) == NULL) {
(gdb) n
2628 yyparse ();
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
0xef723ddc in strlen ()
Here is the content of ACSPrinter.pl
----------------------------------------------------------------------
defcorona {
name { Printer }
domain { ACS }
desc {
Print out one sample from each input port per line. The "fileName"
state specifies the file to be written; the special names
<stdout> and <cout>, which specify the standard output
stream, and <stderr> and <cerr>, which specify the
standard error stream, are also supported.
}
version { @(#)ACSPrinter.pl 1.1 03/09/98 }
author { James Lundblad }
copyright {
Copyright (c) 1998 The Regents of the University of California.
All rights reserved.
See the file $PTOLEMY/copyright for copyright notice,
limitation of liability, and disclaimer of warranty provisions.
}
location { ACS main library }
inmulti {
name { input }
type { ANYTYPE }
}
}
----------------------------------------------------------------------
Thanks for any pointer,
Dinh
[EMAIL PROTECTED]
---------------------------------------------------------------------------
-
Posted to the ptolemy-hackers mailing list. Please send administrative
mail for this list to: [EMAIL PROTECTED]
--------
----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list. Please send administrative
mail for this list to: [EMAIL PROTECTED]