Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,4 @@
---
category:
- Simple
from: http://rosettacode.org/wiki/Halt_and_catch_fire

View file

@ -0,0 +1,14 @@
;Task
Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok?
The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an internal corruption has been detected and it would be dangerous and irresponsible to continue.
;References
* [[wp:Halt_and_Catch_Fire_(computing)|Wikipedia: Halt and Catch Fire]]
;Related Tasks
* [[Program termination]]
<br><br>

View file

@ -0,0 +1 @@
assert(0B)

View file

@ -0,0 +1 @@
db $02

View file

@ -0,0 +1,2 @@
forever:
jmp forever

View file

@ -0,0 +1 @@
jmp * ;many assemblers allow * or $ to represent the address of this line of code.

View file

@ -0,0 +1,2 @@
di
hlt

View file

@ -0,0 +1,2 @@
cli
hlt

View file

@ -0,0 +1 @@
( print( ( 1 OVER 0 ) ) )

View file

@ -0,0 +1 @@
assert false.

View file

@ -0,0 +1,11 @@
# syntax: GAWK -f HALT_AND_CATCH_FIRE.AWK
#
# This won't halt the CPU but the program will crash immediately on startup
# with "error: division by zero attempted".
BEGIN { 1/0 }
#
# This will heat up the CPU, don't think it will catch on fire.
BEGIN { while(1) {} }
#
# Under TAWK 5.0 using AWKW will immediately abort.
BEGIN { abort(1) }

View file

@ -0,0 +1,4 @@
procedure Halt_And_Catch_Fire is
begin
raise Program_Error with "Halt and catch fire";
end Halt_And_Catch_Fire;

View file

@ -0,0 +1 @@
HCF$ = CHR$ (184) + "P" + CHR$ (254): CALL PEEK ( PEEK (131) + PEEK (132) * 256 + 1) + PEEK ( PEEK (131) + PEEK (132) * 256 + 2) * 256

View file

@ -0,0 +1 @@
0/0

View file

@ -0,0 +1,2 @@
! "Insert value that is not 1"
"Error Message" ! "Value that is not 1, again"

View file

@ -0,0 +1,5 @@
#include <stdexcept>
int main()
{
throw std::runtime_error("boom");
}

View file

@ -0,0 +1 @@
int a=0,b=1/a;

View file

@ -0,0 +1 @@
int a=1/0;

View file

@ -0,0 +1 @@
throw new System.Exception();

View file

@ -0,0 +1 @@
int main(){int a=0, b=0, c=a/b;}

View file

@ -0,0 +1 @@
raise "fire"

View file

@ -0,0 +1,4 @@
procedure HaltAndCatchFire;
begin
raise Exception.Create('Burning to the ground');
end;

View file

@ -0,0 +1 @@
0/0

View file

@ -0,0 +1 @@
.

View file

@ -0,0 +1 @@
0

View file

@ -0,0 +1 @@
+

View file

@ -0,0 +1 @@
1

View file

@ -0,0 +1 @@
USE: kernel IN: a : b ( -- ) die ; MAIN: b

View file

@ -0,0 +1 @@
Func S=S. S;

View file

@ -0,0 +1 @@
while 1 do !' od;

View file

@ -0,0 +1,3 @@
PROGRAM A
CALL ABORT
END

View file

@ -0,0 +1 @@
poke 0,0

View file

@ -0,0 +1,3 @@
#define A() B()
#define B() A()
A()

View file

@ -0,0 +1,2 @@
extends Node
func _init():$a.a()

View file

@ -0,0 +1 @@
0 gosub 0

View file

@ -0,0 +1 @@
package main; import "fmt"; func main(){a, b := 0, 0; fmt.Println(a/b)}

View file

@ -0,0 +1 @@
package main; func main(){panic(0)}

View file

@ -0,0 +1 @@
export fn main() void = abort();

View file

@ -0,0 +1 @@
main = error "Instant crash"

View file

@ -0,0 +1 @@
(1e6$a.) memw (mema 1),0 1e6

View file

@ -0,0 +1 @@
exit 0

View file

@ -0,0 +1 @@
"whoops" | error

View file

@ -0,0 +1 @@
0 | error("whoops")

View file

@ -0,0 +1 @@
@assert false "Halt and catch fire."

View file

@ -0,0 +1 @@
unsafe_load(convert(Ptr{Int}, C_NULL))

View file

@ -0,0 +1 @@
Let

View file

@ -0,0 +1 @@
error(1)

View file

@ -0,0 +1 @@
assert(false)

View file

@ -0,0 +1 @@
Abort[]

View file

@ -0,0 +1 @@
assert false

View file

@ -0,0 +1 @@
echo 1 div 0

View file

@ -0,0 +1 @@
assert 1==0

View file

@ -0,0 +1 @@
100H: GOTO 0; EOF

View file

@ -0,0 +1 @@
begin pByte($0)^ := 0 end.

View file

@ -0,0 +1 @@
&a

View file

@ -0,0 +1,3 @@
(phixonline)-->
<span style="color: #0000FF;">?</span><span style="color: #000000;">9</span><span style="color: #0000FF;">/</span><span style="color: #000000;">0</span>
<!--

View file

@ -0,0 +1,23 @@
(phixonline)-->
<span style="color: #008080;">try</span>
#ilASM{
[PE32]
push 1 -- uExitCode
call "kernel32","ExitProcess"
[PE64]
sub rsp,8*5
mov rcx,1 -- uExitCode
call "kernel32","ExitProcess"
[ELF32]
xor ebx, ebx
mov eax, 1 -- SYSCALL_EXIT
int 0x80
[ELF64]
mov rax,231 -- sys_exit_group(rdi=int error_code)
xor rdi,rdi
syscall
}
<span style="color: #008080;">catch</span> <span style="color: #000000;">e</span>
<span style="color: #0000FF;">?</span><span style="color: #000000;">e</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">try</span>
<!--

View file

@ -0,0 +1 @@
0/0

View file

@ -0,0 +1 @@
_=1;_+=

View file

@ -0,0 +1 @@
_+=1

View file

@ -0,0 +1 @@
+

View file

@ -0,0 +1 @@
++8

View file

@ -0,0 +1 @@
die

View file

@ -0,0 +1,9 @@
use Test;
dies-ok { ++8 };
dies-ok { die };
dies-ok { };
eval-dies-ok '++8';
eval-dies-ok 'die';
eval-dies-ok '' ;

View file

@ -0,0 +1,5 @@
try
see 5/0
catch
see "Catch!" + nl + cCatchError
done

View file

@ -0,0 +1 @@
raise

View file

@ -0,0 +1 @@
fn main(){panic!("");}

View file

@ -0,0 +1 @@
fatalError("You've met with a terrible fate, haven't you?")

View file

@ -0,0 +1 @@
0 gosub 0

View file

@ -0,0 +1 @@
fn main() { panic(0) }

View file

@ -0,0 +1 @@
Fiber.abort("")

View file

@ -0,0 +1 @@
error("Crashed");

View file

@ -0,0 +1 @@
proc Recurse; Recurse; Recurse

View file

@ -0,0 +1,2 @@
di
halt