<commit_before>// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1
// Regression test for
// https://code.google.com/p/address-sanitizer/issues/detail?id=250
#include <stdio.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <assert.h>

int main() {
  int id = shmget(IPC_PRIVATE, 4096, 0644 | IPC_CREAT);
  assert(id > -1);
  struct shmid_ds ds;
  int res = shmctl(id, IPC_STAT, &ds);
  assert(res > -1);
  printf("shm_segsz: %zd\n", ds.shm_segsz);
  assert(ds.shm_segsz == 4096);
}
<commit_msg>[asan] clean up at the end of the shmget/shmctl test<commit_after>// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1
// Regression test for
// https://code.google.com/p/address-sanitizer/issues/detail?id=250
#include <stdio.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <assert.h>

int main() {
  int id = shmget(IPC_PRIVATE, 4096, 0644 | IPC_CREAT);
  assert(id > -1);
  struct shmid_ds ds;
  int res = shmctl(id, IPC_STAT, &ds);
  assert(res > -1);
  printf("shm_segsz: %zd\n", ds.shm_segsz);
  assert(ds.shm_segsz == 4096);
  assert(-1 != shmctl(id, IPC_RMID, 0));
}

{'fraction_non_alphanumeric': 0.1904315196998124, 'fraction_numerical': 0.039399624765478425, 'mean_word_length': 3.872146118721461, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2225296', 'n_tokens_mistral': 518, 'n_tokens_neox': 484, 'n_words': 105}