This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Uninitialised memory read in gcc-2.95.2/gcc/cppexp.c


Purify reports:
****  Purify instrumented /home/erieye/members/eplmst/gcc/gcc-2.95.2/obj/gcc/fix-header (pid 23948)  ****
UMR: Uninitialized memory read (4 times):
  * This is occurring while in:
	cpp_parse_expr [cppexp.c:792]
	eval_if_expression [cpplib.c:1617]
	do_if          [cpplib.c:1557]
	handle_directive [cpplib.c:545]
	cpp_get_token  [cpplib.c:2132]
	scan_decls     [scan-decls.c:95]
  * Reading 1 byte from 0xefffc73c on the stack.
  * Address 0xefffc73c is 20 bytes past start of local variable "init_stack" in function cpp_parse_expr.

****  Purify instrumented /home/erieye/members/eplmst/gcc/gcc-2.95.2/obj/gcc/fix-header (pid 23948)  ****
UMR: Uninitialized memory read:
  * This is occurring while in:
	cpp_parse_expr [cppexp.c:792]
	eval_if_expression [cpplib.c:1617]
	do_if          [cpplib.c:1557]
	handle_directive [cpplib.c:545]
	cpp_get_token  [cpplib.c:2132]
	scan_decls     [scan-decls.c:95]
  * Reading 1 byte from 0xefffc73c on the stack.
  * Address 0xefffc73c is 20 bytes past start of local variable "init_stack" in function cpp_parse_expr.


The file cppexp.c around line 792 looks like:
      while (top->rprio > lprio)
	{
	  HOST_WIDEST_INT v1 = top[-1].value, v2 = top[0].value;
	  int unsigned1 = top[-1].unsignedp, unsigned2 = top[0].unsignedp; /* This is line 792. */
	  top--;
	  if ((top[1].flags & LEFT_OPERAND_REQUIRED)
	      && ! (top[0].flags & HAVE_VALUE))
	    {
	      cpp_error (pfile, "syntax error - missing left operand");
	      goto syntax_error;
	    }


Alas I don't understand this variable top. So somebody who does perhaps
can see what's amiss?


Right,

							MartinS

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]