opentitan
opentitan copied to clipboard
[dv/dpi] TCP server enters infinite loop if ring buffer is full
Description
The rptr
and wptr
variables here are missing volatile
, so GCC will optimize the while loop in tcp_server_put_byte to a branch and an infinite loop when compiling with -O2. as you can see in this godbolt link.