Skip to content

Commit

Permalink
feat(induce_crash): a tactic that crashes the server, for IDE testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Morrison committed Mar 21, 2019
1 parent 098c2cb commit 5be2aa3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/tactic/induce_crash.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/-
Copyright (c) 2019 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison
-/
@[user_attribute]
meta def crash_attribute : user_attribute unit unit := {
name := `sigbus,
descr := "An attribute to help generate server crashes, for debugging IDE interactions.",
cache_cfg :=
{ mk_cache := λ ls, crash_attribute.get_cache,
dependencies := [] }
}

/-- This tactic crashes the server, exploiting a stack overflow in
attribute caching. -/
meta def induce_crash : tactic unit := crash_attribute.get_cache

-- run_cmd induce_crash

0 comments on commit 5be2aa3

Please sign in to comment.