> From: Frank Ch. Eigler [mailto:fche@xxxxxxxxxx]
> ...
> Just a WAG, but could it be that *icp is getting corrupted by a
misaddressed
> assignment on line 1257?
Fair guess Frank.
But this is smelling like a valgrind/toolchain bug.
If I change the source thusly ...
1250 if ((vp = (pmValueBlock *)malloc(need)) == NULL) {
1251 sts = -oserror();
1252 goto bad_alloc;
1253 }
1254 vp->vlen = need;
1255 vp->vtype = PM_TYPE_FLOAT;
1256 rp->vset[j]->valfmt = PM_VAL_DPTR;
1257 fprintf(stderr, "new float pval=%p icp=%p t_prior=%.6f\n",
&rp->vset[j]->vl ist[i].value.pval, icp, icp->t_prior);
1258 rp->vset[j]->vlist[i++].value.pval = vp;
1259 if (icp->t_prior == t_req)
there is nothing strange reported (specifically the address of "pval" is
not aliased to the address icp points to) BUT the valgrind error goes away
... Heisenbug strikes again.
Comment out line 1257 and the valgrind reported "error" returns.
I'm planning to suppress this one conditionally for this version of valgrind
and gcc.
|