mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-18 20:20:29 +00:00
This reverts commit bf6bb800c4.
This commit is contained in:
1 parent
8b3bb7c5e9
commit
f5300a84e5
55 files changed
+7431
-293
No files matched your search
+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