On 21/12/17 21:15, Jim Meyering wrote: > On Thu, Dec 21, 2017 at 7:54 AM, Pádraig Brady <[email protected]> wrote: >> Some initial test results. All tests pass on: >> >> x86_64 Fedora25 (+ASAN) >> ARMv7l ArchLinux >> sparc Solaris10 >> aarch64 Centos7 > > On Fedora 27 x86_64, with gcc.git and UBSAN, I see many of these: > > + src/pr.c:2562:9: runtime error: pointer index expression with base > 0x000002359840 overflowed to 0xffffffffd205680f9Pbj... > pr: test 9Pbj: stderr mismatch, comparing 9Pbj.1 (expected) and 9Pbj.E > (actual) > *** 9Pbj.1 Thu Dec 21 11:26:25 2017 > --- 9Pbj.E Thu Dec 21 11:26:25 2017 > *************** > *** 0 **** > --- 1 ---- > > Perhaps not surprisingly, that diagnostic points to this > declaration/assignment of "last": > > static bool > print_stored (COLUMN *p) > { > COLUMN *q; > > int line = p->current_line++; > char *first = &buff[line_vector[line]]; > /* FIXME > UMR: Uninitialized memory read: > * This is occurring while in: > print_stored [pr.c:2239] > * Reading 4 bytes from 0x5148c in the heap. > * Address 0x5148c is 4 bytes into a malloc'd block at 0x51488 of > 676 bytes > * This block was allocated from: > malloc [rtlib.o] > xmalloc [xmalloc.c:94] > init_store_cols [pr.c:1648] > */ > char *last = &buff[line_vector[line + 1]]; >
Interesting. What prompted the above comment? I see valgrind doesn't currently at least: valgrind src/pr -n.3 +6 -b -3 -l 13 -f tests/pr/tFFt >/dev/null thanks, Pádraig
