This is the mail archive of the 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]
Other format: [Raw text]

Re: RFC: --enable-checking=valgrind.

On Tue, 12 Nov 2002, Jan Hubicka wrote:
> > On Mon, Nov 11, 2002 at 04:55:17AM -0500, Hans-Peter Nilsson wrote:
> > > ==5784== Conditional jump or move depends on uninitialised value(s)
> > > ==5784==    at 0x81EE503: get_attr_prefix_0f (insn-attrtab.c:23298)

> > Hmm.  This is probabably just one bug, in genattrtab, but genattrtab
> > is such a mess I don't know where to begin looking.
> It is probably bug in the machine description.
> We use type information to figure out how many arguments instruction
> have.
> In case it has fewer arugments, we access uninitialized memory that
> "usually works :)".  If you will just go to gdb and do "p debug_rtx (insn)"
> I think I can fix the bugs easilly.

Hum, as I said I was just soliciting feedback about whether this
feature would be useful at all, and would then rather get the
patch into shape to be applied so people can do this by
themselves.  But since you think it's useful and Zack dives into
reviewing the details, I guess it is, and it's time to shape up
the damn patch. :-)

It'll take a week to run regression tests, so I hope I can just
settle for a successful bootstrap & check without
--enable-checking=valgrind and a successful bootstrap with it.
Bootstrap hasn't even finished compiling the java libs.  Maybe I
can get a "discount", to just need --enable-languages=c.

Here's the insn in get_attr_prefix_0f for the first trigging call
when, with a suitable --save-temps, doing
valgrind  --num-callers=20 --gdb-attach=yes ./stage1/cc1
 -fpreprocessed libgcc2.i -quiet -dumpbase libgcc2.c
 -auxbase-strip /tmp/bb.s -g -O2 -W -Wall  -Wwrite-strings
 -Wstrict-prototypes -Wmissing-prototypes -version -fPIC -o /tmp/bb.s
(I can't seem to get useful debug info out of the bootstrapped
cc1, using gdb-5.2.1)

Please excuse the line-wrapping.

(jump_insn:HI 22 285 36 0x4176ba50 (set (pc)
        (if_then_else (lt (reg:CCGOC 17 flags)
                (const_int 0 [0x0]))
            (label_ref 295)
            (pc))) 509 {*jcc_1} (insn_list:REG_DEP_ANTI 268 (insn_list:REG_DEP_ANTI 263 (insn_list:REG_DEP_ANTI 264
(insn_list:REG_DEP_ANTI 5 (insn_list:REG_DEP_ANTI 208 (insn_list:REG_DEP_ANTI 209 (insn_list:REG_DEP_ANTI 284 (insn_list 285
(insn_list:REG_DEP_ANTI 267 (insn_list:REG_DEP_ANTI 269 (insn_list:REG_DEP_ANTI 270 (insn_list:REG_DEP_ANTI 271 (insn_list:REG_DEP_ANTI 265
(insn_list:REG_DEP_ANTI 266 (insn_list:REG_DEP_ANTI 226 (nil))))))))))))))))
    (expr_list:REG_DEAD (reg:CCGOC 17 flags)
        (expr_list:REG_BR_PROB (const_int 2100 [0x834])

the same insn also trigs later, for a total of three

brgds, H-P

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