mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
14 lines
307 B
Plaintext
14 lines
307 B
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
// Use-after-free.
|
|
|
|
fun main() -> Int {
|
|
var Ptr(int): p;
|
|
p = malloc(Int);
|
|
*p = 0;
|
|
free(p);
|
|
return *p;
|
|
}
|