Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #![allow(unreachable_code)]
  2.  
  3.  
  4. fn main() {
  5. println!("{:?}", {
  6. macro_rules! segfault { () => { unsafe { std::ptr::write(0xDEADBEEFusize as *mut usize, 0); } } } segfault!()
  7. });
  8. }
  9.  
  10.  
  11. /* ~~~~=== stderr ===~~~~
  12. Compiling playground v0.0.1 (/playground)
  13. Finished dev [unoptimized + debuginfo] target(s) in 0.44s
  14. Running `target/debug/playground`
  15. timeout: the monitored command dumped core
  16. /root/entrypoint.sh: line 8: 8 Segmentation fault timeout --signal=KILL ${timeout} "$@"
  17.  
  18. */
  19.  
  20. /* ~~~~=== stdout ===~~~~
  21.  
  22. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement