ChampSim
900-btb-bounds-check.cc File Reference
#include <catch.hpp>
#include "mocks.hpp"
#include "defaults.hpp"
#include "ooo_cpu.h"
Include dependency graph for 900-btb-bounds-check.cc:

Functions

 TEST_CASE ("The basic_btb module does not overflow its bounds.")
 

Function Documentation

◆ TEST_CASE()

TEST_CASE ( "The basic_btb module does not overflow its bounds."  )

The BTB module had a sneaky bug. If:

  • There is more than one core, and
  • The BTB mispredicts a direct branch, and
  • The IP was one less than a multiple of 1024, and
  • The IP was not present in the BTB Then, there would be a buffer overflow and a later prediction to some other core will segfault.