File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 1
- // RUN: %target-sil-opt -enable-objc-interop -module-name mandatory_inlining -enable-sil-verify-all %s -mandatory-inlining | %FileCheck %s
1
+ // RUN: env DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib %target-sil-opt -enable-objc-interop -module-name mandatory_inlining -enable-sil-verify-all %s -mandatory-inlining | %FileCheck %s
2
2
3
3
import Builtin
4
4
import Swift
@@ -1463,3 +1463,23 @@ bb0(%0 : $*Mystruct, %1 : $Bool):
1463
1463
return %19 : $()
1464
1464
}
1465
1465
1466
+ sil [transparent] [ossa] @callee : $@convention(thin) () -> () {
1467
+ bb0:
1468
+ %r = tuple ()
1469
+ return %r : $()
1470
+ }
1471
+
1472
+ // This test needs the guard malloc to crash without the fix in #35037
1473
+ // Tests there is no use-after-free in ClosureCleanup::recordDeadFunction when deleting debug instructions
1474
+ // CHECK-LABEL : sil [ossa] @$test_no_use_after_free :
1475
+ // CHECK-LABEL : } // end sil function '$test_no_use_after_free'
1476
+ sil [ossa] @$test_no_use_after_free : $@convention(thin) () -> () {
1477
+ bb0:
1478
+ %12 = function_ref @callee : $@convention(thin) () -> ()
1479
+ %13 = thin_to_thick_function %12 : $@convention(thin) () -> () to $@callee_guaranteed () -> ()
1480
+ debug_value %13 : $@callee_guaranteed () -> ()
1481
+ %28 = apply %13() : $@callee_guaranteed () -> ()
1482
+ %r = tuple ()
1483
+ return %r : $()
1484
+ }
1485
+
You can’t perform that action at this time.
0 commit comments