Remix.run Logo
▲ nine_k an hour ago

But how is your example UB? It's straightforward data flow analysis.

AFAICT, UBI is stuff like that:

  short int i;
  for (i = 0; i < 33000; i++) do_something();
Whether this program continues as normal, crashes, or enters an infinite loop is platform-dependent, because short int can be as small as 16 bit, and an integer overflow past 32767 can be a crash or a wraparound.