brintos

brintos / llvm-project-archived public Read only

0
0
Text · 466 B · b0a05f7 Raw
23 lines · c
1// Regression test for https://bugs.llvm.org/show_bug.cgi?id=328422//3// RUN: %clang_msan -g %s -o %t4// RUN: not %run %t 2>&1 | FileCheck  %s5 6struct iphdr {7  unsigned char pad1: 2, ihl:4, pad2: 2;8};9 10int raw_send_hdrinc(unsigned long int length) {11  struct iphdr iph;12  if (iph.ihl * 4 > length) {13    return 1;14  }15  return 0;16}17 18int main(int argc, char *argv[]) {19  return raw_send_hdrinc(12);20}21 22// CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value23