mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 10:11:06 +01:00
This reverts commit bf6bb800c4.
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
// 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;
|
||||
}
|
||||
Reference in New Issue
Block a user