Cproto 4.6 core dumping

2001-01-15
2001-01-26
  • Bruce A. Mallett

    Hi,

    I get the following stack trace when I run cproto-4.6 on a SunOS system:

    629: dbx cproto core
    Reading cproto
    core file header read successfully
    Reading ld.so.1
    Reading libc.so.1
    Reading libdl.so.1
    Reading libc_psr.so.1
    program terminated by signal SEGV (no mapping at the fault address)
    Current function is yaccExpected
      130               k = 80 - (strlen(vec[last-1]) + 2);
    (/rose3/SUNWspro/bin//../WS6/bin/sparcv9/dbx) where
      [1] strlen(0x0, 0x0, 0x4, 0x7efefeff, 0x81010100, 0x2), at 0xff2b2e5c
    =>[2] yaccExpected(s = 0x36858 "", count = -1), line 130 in "yyerror.c"
      [3] yyparse(), line 315 in "grammar.y"
      [4] process_file(infile = 0x4df50, name = 0xffbee97c "main.c"), line 893 in "grammar.y"
      [5] main(argc = 11, argv = 0xffbee6ec), line 819 in "cproto.c"

    The value of "last" at line 130 of yyerror.c (function yaccExpected()) is 1.  The value of vec[0] (i.e., "vec[last-1]") is nil (0).

    Does this make any sense to you?

    Thanks,

      - Bruce

     
    • Chin Huang

      Chin Huang - 2001-01-16

      This defect might be fixed in the current source in the CVS repository.  Can you give that a try?

       
      • Bruce A. Mallett

        Sorry this took so long.  I tried the CVS version and it is better.  However it still needs the lintlibs.c change that I sent you via private Email to work correctly.  For example try this simple input file:

        =====================nsre.c====================
        char const *    ReErrorText( int h_re )

        {
                return ( 0 );

        }       /* ReErrorText() */
        =====================nsre.c====================

        It will produce the (incorrect) results:

        =============
        char const *ReErrorText(int h_re) = {0};
        =============

        Make the lintlibs.c change and you get the (correct) results:

        =============
        char const *ReErrorText(int h_re);
        =============

             - Bruce

         
        • Chin Huang

          Chin Huang - 2001-01-26

          Okay, I checked in your change along with changes to the test data under the testing directory so the test cases pass.

           

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks