General protection fault and invalid opcode exception when using sodium
Created by: skylerberg
Reproduction: This one is really hard to repro, I have tried it about 50 times and I get different results.
- Start orbital
- Open sodium
- Enter the following keystrokes: iadad<SHIFT+space>djdj
Explanation of above: go into insert mode, enter a few lines with some text on some of them, leave insert mode and try to delete the next line twice in a row. It could be coincidence, but the kernel errors seem to be much more likely to appear if you do
djdj
REALLY fast.
Expected behavior: Nothing breaks.
Actual behavior:
Behavior varies. Here are the possible outcomes I have seen:
- Sodium fails and stops responding to input. It cannot be closed. The following is output to the terminal:
Starting Sodium
First redraw of the screen
Out of bound in filesystem/apps/sodium/src/edit/buffer.rs:183
- System hangs, the following is output to the terminal:
Starting Sodium
First redraw of the screen
Out of bound in filesystem/apps/sodium/src/edit/buffer.rs:183
PID 18: file:/bin/launcher
INT D: General protection fault
CS: 00000008 IP: 04A2AF61 FLG: 00010082
SS: 00000000 SP: 04A2AF50 BP: 04A2ADD0
AX: 04A2ADAB BX: 03545000 CX: 02DE9000 DX: 04A2AB04
DI: 04A2ADB0 SI: 04A2ADB0
CR0: 80010033 CR2: 00000000 CR3: 00200000 CR4: 00000600
FSW: 00000000 FCW: 0000037F
-480: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-448: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-416: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-384: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-352: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-320: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-288: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-256: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-224: 00000000 00000000 00000000 00000000 00000000 0000FFFF 00001F80 00000000
-192: 00000000 00000000 00000000 00000000 0000037F 00000000 00000000 00000000
-160: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-128: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-96: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-64: 00000000 00000000 00000000 00000000 00000000 00000023 B00FCA44 00000296
-32: 0000001B 0806CA52 B00FCA78 B00FCA70 B00FCAF0 00001000 B00FCA5C 00001000
0: 0000009E 04A2AF50 00000080 000090D5 B00FCA78 00001000 B00FCAF0 B00FCA70
32: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
64: 00000000 00000000 00000000 00D0C01C 00000000 00000000 00000000 00000080
96: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
128: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
160: 00000000 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D
192: 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D
224: 1D1D1D1D 00000000 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D
256: 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D
288: 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D
320: 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D FFFFFFFF FFFFFFFF
352: 00A01000 FFFFFFFF 00000000 00000000 00000007 00A01000 04A2AF50 001174B1
384: 04A2AF40 00000000 0F0BE7EC FFFFFFFF 0353F000 00000000 00000000 00D0C020
416: 00000000 03561000 04A2ADB8 00117EA2 04A2ADD0 00001000 00000000 04A2AF50
448: 00010082 00000008 04A2AF61 04A2ADD0 00D0C020 04A2ADB0 04A2AB04 02DE9000
480: 03545000 04A2ADAB 04A2AD6C 0000000D 000090D5 04A2ADD0 03545000 04A2ADB0
ERR: 00001000
- The system hangs, the following is output to the terminal:
Starting Sodium
First redraw of the screen
Out of bound in filesystem/apps/sodium/src/edit/buffer.rs:183
PID 18: file:/bin/launcher
INT 6: Invalid opcode exception
CS: 00000008 IP: 00D0D026 FLG: 00010086
SS: 39B221FC SP: 04AECD56 BP: 04AECDA0
AX: FFFFFFFF BX: 03545003 CX: 02DE9000 DX: 04AECB36
DI: 04AECD7F SI: 04AECD7F
CR0: 80010033 CR2: 00000000 CR3: 00200000 CR4: 00000600
FSW: 00000041 FCW: 0000037F
-480: CAF0B00F CA700000 00000000 00000000 00000000 00000000 00000000 00000000
-448: 00000000 00000000 00000000 00000000 000000D0 C01C0000 00000000 00000000
-416: 00000000 00200000 00000000 00000000 00000000 00000000 00000000 00000000
-384: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-352: 00000000 00000000 00001D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D
-320: 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D
-288: 1D1D1D1D 1D1D1D1D 1D1D0000 00001D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D
-256: 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D
-224: 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D
-192: 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1DFFFF
-160: FFFFFFFF FFFF00A0 1000FFFF FFFF0000 00000000 00000000 000700A0 100004AE
-128: CF000010 947B04AE CF400000 00002E6B B214FFFF FFFF0353 D0000000 00000000
-96: 00000000 1000B00F CAF00000 000604AE CDB80000 000704AE CDD00000 100000A0
-64: 10000010 10AC04AE CDD00000 000704AE CDB000A0 100004AE 00000356 100004AE
-32: CDA000D0 C0200000 00000356 100000D0 C004AECD 69035450 0104ADFF FF04AECB
0: 39B221FC 04AECD56 00010086 00000008 00D0D026 04AECDA0 00D0C020 04AECD7F
32: 04AECB36 02DE9000 03545003 FFFFFFFF 04AECD2A 00000006 000090D5 04AECDA0
64: 03545003 04AECD7F 00D0C020 70000353 B0000000 00000000 00000000 00000000
96: 00000014 544004AE CC900000 000104AE CCB00000 00010014 6D600000 00090000
128: 00000354 B0540000 00000000 00060353 B04000D0 C01C8001 003300A0 10000000
160: 00230014 57A004AE CC500000 000404AE CCD80014 54400000 00090000 00090356
192: 30000020 00000000 06000000 00410000 037F1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D
224: 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D
256: 1D1D0000 01001D1D 1D1D1D1D 1D1D1D1D 1D1D0354 50781D1D 1D1D1D1D 1D1D1D1D
288: 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D
320: 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D
352: 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D 1D1D1D1D
384: 1D1D1D1D 1D1D0000 00010000 006004AE CD560000 000D0000 00000000 00020000
416: 00080356 30000356 30000010 E29804AE CCD80356 30000000 000504AE CCD80000
448: 00080356 300000A0 10300011 86760356 30000000 000904AE CCD80000 003000A0
480: 10300012 D81C04AE CD1A0356 30080356 300900A0 10300000 01E80356 30000000