help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

help required on bison.simple


From: psadhukhan
Subject: help required on bison.simple
Date: Wed, 23 Apr 2003 18:30:29 +0530




Hi All,

I am using GNU bison version 1.28 to parse SIP protocol messages.  My code
was being tested with
Purify memory debugger. I face the following problem :

For some messages I find that the following piece of code in the file
"bison.simple" is getting executed and
throwing up a Array Bounds Read error at the location specified below with
==>


<snip>
/* PATCH1: typecast sizeof to return int */
          for (x = (yyn < 0 ? -yyn : 0);
               x < (int)(sizeof(yytname) / sizeof(char *)); x++)
==>   if (yycheck[x + yyn] == x)
              size += strlen(yytname[x]) + 15, count++;
          msg = (char *) malloc(size + 15);
          if (msg != 0)
          {
              strcpy(msg, "parse error");

              if (count < 5)
                {
                  count = 0;
                  for (x = (yyn < 0 ? -yyn : 0);
<snip>

The question is when can this error occur ? Has anybody else faced the same
 problem?
Any pointers towards the solution would be very helpful.

Regards
Prateek







This message is proprietary to Hughes Software Systems Limited (HSS) and is
intended solely for the use of the individual to whom it is addressed.  It
may contain privileged or confidential information and should not be
circulated or used for any purpose other than for what it is intended.  If
you have received this message in error, please notify the originator
immediately.  If you are not the intended recipient, you are notified that
you are strictly prohibited from using, copying, altering, or disclosing
the contents of this message.  HSS accepts no responsibility for loss or
damage arising from the use of the information transmitted by this email
including damage from virus.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]