summaryrefslogtreecommitdiff
path: root/test/asan/TestCases/Darwin/empty-section.cc
blob: 5b006b545488cfa91e84aa1b67a6bf66704e6ef9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Regression test with an empty (length = 0) custom section.

// RUN: %clangxx_asan -g -O0 %s -c -o %t.o
// RUN: %clangxx_asan -g -O0 %t.o -o %t -sectcreate mysegment mysection /dev/null
// RUN: %run %t 2>&1 | FileCheck %s

#include <stdio.h>

int main() {
  printf("Hello, world!\n");
  // CHECK: Hello, world!
}