undef2.6c 307 B

12345678910111213
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. // Use-after-free.
  5. fun main() -> Int {
  6. var Ptr(int): p;
  7. p = malloc(Int);
  8. *p = 0;
  9. free(p);
  10. return *p;
  11. }