| 1 | // RUN: %clangxx_msan -O0 %s -o %t && %run %t |
|---|---|
| 2 | |
| 3 | #include <sys/types.h> |
| 4 | #include <grp.h> |
| 5 | #include <unistd.h> // FreeBSD declares initgroups() here. |
| 6 | |
| 7 | int main(void) { |
| 8 | initgroups(user: "root", group: 0); |
| 9 | // The above fails unless you are root. Does not matter, MSan false positive |
| 10 | // (which we are testing for) happens anyway. |
| 11 | return 0; |
| 12 | } |
| 13 |
