ACATS c380004

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Fri Jan 7 15:55:00 GMT 2005


    Well, the information from valgrind shows that bad code is being
    produced (eg: silly arg (-2147483640) to malloc()).  

Right.  It's trying to allocate an amount of memory that overflows because
it thinks it needs to allocate an array of 2**32 entries.  This can either
end up allocating zero bytes, a negative number, or a large positive
number depending on lot of random things.

    By the way, gcc at the pre-ssa tag doesn't fail this test, and
    valgrind doesn't show any problems for it.

Try it on a 64-bit machine.

As I said, this is a well-understood issue and has to do with an obscure
part of language semantics.  (Sufficiently-obscure that I can't explain it.
Arno, can you try?)



More information about the Gcc mailing list