app/test: fix crash for fbk hashes with a lot of entries
app/test: fix crash for fbk hashes with a lot of entries

The four-byte-key (fbk) autotest was allocating the keys to be used for
the test on the stack. When the number of entries in the table was
increased significantly, for example, to test larger hashes by increase the
value of ENTRIES, this array of keys was greater than that
allowed on the stack, and so caused problems, i.e. crashes and core dumps.

The solution is to have the keys dynamically allocated on the heap using
malloc. Now if ENTRIES is increased and we run out of memory we get an
error message instead of a crash.

Signed-off-by: Bruce Richardson <66b9e8e8fbd5e9f41f91b0af050876182ce9d0e4@intel.com>
Acked-by: Pablo de Lara <28355d9cfe41bb8148aea0fb24f47aae8f4217a1@intel.com>

phermansson/dpdk,phermansson/dpdk,phermansson/dpdk,phermansson/dpdk