This is the mail archive of the libc-help@sourceware.org mailing list for the glibc 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: strange problem in libc: free invalid pointer, but valgrind doesn't show it.


I added a call to the print statement before the assignment.

When not in vg, it gets ugly:
FMG:rfrsh:sc(0)<W(696);sw={0/1;1},s/c={0/1;1}
fields_sz=3, vals=2147483636,2147483637,2147483637,
col_samp_dat_sz=3, vals=2147483630,2147483637,2147483637,
samples[0].D_sz=-1162167622, vals=2147483620,2147483637,2147483637,...doesn't stop.

When in vg it looks normal:

FMG:rfrsh:sc(0)<W(696);sw={0/1;1},s/c={0/1;1}
fields_sz=3, vals=2147483636,2147483637,2147483637,
col_samp_dat_sz=3, vals=2147483630,2147483637,2147483637,
samples[0].D_sz=0, vals=
samples[0].D_sz=3, vals=2147483630,2147483637,2147483637,
---

So it looks like it doesn't like me assigning to a val array not of the
same size?  But it works on vg?

I have an idea of how to work around this, but shouldn't the
l-value "array" pick up it's size from the r-value "array"  (C++ valarray)?

FWIW, no value in samples "should" have a data array(D) w/sz=0, so
I'm guessing that fixing that should stop this from happening.

If the space on a valarray needs to be pre-declared, then that's
the problem.  If not, then dunno.

Cheers, and sorry for the bother if it's a language-cockpit error...






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