FreeRTOS+TCP with BufferAllocation_1.c HardFault

Thank you for the detailed investigation.

Your conclusion from the observations seems right and it does look like a memory corruption. Lets start with the following -

  1. Define configASSERT.
  2. Enable stack overflow checking - FreeRTOS - stacks and stack overflow checking

For a quick check, can you try increasing the stack sizes (like 4x or something)?