Please initialize this memory to zero, either by switching to *calloc(3)* or using *memset(3)*. You're only setting `metrics[i]` conditionally below, so you might access uninitialized memory in the "register values" for-loop.