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

RE: how to fix Heisenbug


> -----Original Message-----
> From: gcc-owner On Behalf Of Dale Johannesen
> Sent: 21 December 2004 23:48

> I have a heisenbug that shows up as a crash in avail_expr_eq in
> the dominator optimizer; but the problem is lower down.  The
> basic problem is that there are two statements like this:
> 
> #   VUSE <TMT.1588_358>;
> D.68153_962 = __builtin_strlen (s_356);
> 
> #   VUSE <TMT.1588_358>;
> D.68154_963 = strlen (s_356);
> 
> A hash value is computed using iterative_hash_expr; this
> hashes in the pointer value of the callee function_decls, and
> computes different hashes for the statements,   

> Since the hash involves pointers, and there is a problem only
> if both hashes land in the same bucket, there's no way to make a
> reproducible example (in fact, the crash comes and goes
> depending on what options I use to build the compiler).

  Perhaps you could fudge iterative_hash_expr to specially detect when those two
statements are passed in (set a global flag from a higher level if you have
to!), and for those two cases return (as hard-coded constants) known values that
force the hashes to collide?


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


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