-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(induce_crash): a tactic that crashes the server, for IDE testing
- Loading branch information
Scott Morrison
committed
Mar 21, 2019
1 parent
098c2cb
commit 5be2aa3
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |