From: Bruce Richardson Date: Fri, 17 Oct 2014 13:18:12 +0000 (+0100) Subject: app/test: fix crash for fbk hashes with a lot of entries X-Git-Tag: spdx-start~10265 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=46bf72f97b40477ff9a55cbf367b6693c1e360a0;hp=46bf72f97b40477ff9a55cbf367b6693c1e360a0;p=dpdk.git 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 Acked-by: Pablo de Lara ---