This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: [PATCH 3/5] remove deleted BFDs from the archive cache


On Fri, Aug 17, 2012 at 8:56 AM, Hans-Peter Nilsson
<hans-peter.nilsson@axis.com> wrote:
>> From: "H.J. Lu" <hjl.tools@gmail.com>
>> Date: Fri, 17 Aug 2012 07:04:18 +0200
>
>> On Thu, Aug 16, 2012 at 8:53 PM, Hans-Peter Nilsson
>> <hans-peter.nilsson@axis.com> wrote:
>> > With this I still see FAILS for cris-elf and cris-linux-gnu (but
>> > not for arm-unknown-eabi, mipsisa32r2el-unknown-linux-gnu,
>> > mmix-knuth-mmixware):
>> > Running /tmp/hpautotest-binutils/bsrc/src/binutils/testsuite/binutils-all/ar.exp ...
>> > FAIL: ar long file names (bfdtest1)
>> > FAIL: ar thin archive (bfdtest1)
>> >
>> > and in binutils.log:
>> > Executing on host: /tmp/hpautotest-binutils/cris-axis-elf/binutils/bfdtest1 tmpdir/artest.a   (timeout = 300)
>> > /tmp/hpautotest-binutils/cris-axis-elf/binutils/bfdtest1 exited with status 1
>> > /tmp/hpautotest-binutils/cris-axis-elf/binutils/bfdtest1 exited with status 1
>> > FAIL: ar long file names (bfdtest1)
>> > ...
>> > Executing on host: /tmp/hpautotest-binutils/cris-axis-elf/binutils/bfdtest1 tmpdir/artest.a   (timeout = 300)
>> > /tmp/hpautotest-binutils/cris-axis-elf/binutils/bfdtest1 exited with status 1
>> > /tmp/hpautotest-binutils/cris-axis-elf/binutils/bfdtest1 exited with status 1
>> > FAIL: ar thin archive (bfdtest1)
>> >
>> > Looking closer, it seems bfdtest1 is a new test, and a host
>> > program, which might explain the test-result differences.
>> > Shouldn't bfdtest1 be present and tested for native builds only?
>> >
>>
>> bfdtest1 is built the same as other programs.
>
> Not *test* programs.  It seems bfdtest1 is used as input to ar
> in the failing tests.
>
>>  valgrind
>> reports:
>>
>> ==3884==
>> ==3884== Invalid read of size 8
>> ==3884==    at 0x403D85: bfd_generic_openr_next_archived_file (archive.c:765)
>> ==3884==    by 0x402CCA: main (bfdtest1.c:60)
>> ==3884==  Address 0x4c35ec0 is 208 bytes inside a block of size 296 free'd
>> ==3884==    at 0x4A079AE: free (vg_replace_malloc.c:427)
>> ==3884==    by 0x40D9B7: bfd_close (opncls.c:726)
>> ==3884==    by 0x402C9D: main (bfdtest1.c:53)
>> ==3884==
>>
>> My new test is doing its job.  There is a real bug.
>
> That might be, but I'm not sure random binary files for other
> architectures are expected to be valid input to ar.  Is it?
> Ungracious failure surely, but I'm inclined to just skip the
> test (for my targets surely, for non-native if acceptable).

That is not what I saw.  bfdtest1 takes an archive as
input:

/export/build/gnu/binutils-cross/build-cris-elf/binutils/bfdtest1
tmpdir/artest.a
Executing on host:
/export/build/gnu/binutils-cross/build-cris-elf/binutils/bfdtest1
tmpdir/artest.a   (timeout = 300)
spawn -ignore SIGHUP
/export/build/gnu/binutils-cross/build-cris-elf/binutils/bfdtest1
tmpdir/artest.a^M
/export/build/gnu/binutils-cross/build-cris-elf/binutils/bfdtest1
exited with status 1
/export/build/gnu/binutils-cross/build-cris-elf/binutils/bfdtest1
exited with status 1
FAIL: ar long file names (bfdtest1)

It failed because bfdtest1 segfaulted.

-- 
H.J.


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