mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
improve abstraction for AssocList, fix bug in optional else (#315)
* improve abstraction for AssocList, fix bug in optional else * add flag for tracing output, clean up code for output * turned off tracing by default, updated goldens, removed two examples that use pointers, shouldn't have been there yet
This commit is contained in:
-13
@@ -1,13 +0,0 @@
|
||||
// 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