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
package kubectl | |
import ( | |
"context" | |
"errors" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"strings" |
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
systemd-udevd[321280]: Worker [321284] terminated by signal 11 (SEGV) | |
Aug 26 22:23:27 Lenovo-IdeaPad-S145-15IWL systemd-udevd[321280]: hidraw2: Worker [321284] failed | |
Aug 26 22:23:27 Lenovo-IdeaPad-S145-15IWL kernel: [18744.968972] general protection fault, probably for non-canonical address 0xbfffe84b8747e200: 0000 [#13] SMP NOPTI | |
Aug 26 22:23:27 Lenovo-IdeaPad-S145-15IWL kernel: [18744.968983] CPU: 2 PID: 321286 Comm: systemd-udevd Tainted: G D OE 5.11.0-27-generic #29~20.04.1-Ubuntu | |
Aug 26 22:23:27 Lenovo-IdeaPad-S145-15IWL kernel: [18744.968986] Hardware name: LENOVO 81MV/LNVNB161216, BIOS ASCN36WW 05/31/2019 | |
Aug 26 22:23:27 Lenovo-IdeaPad-S145-15IWL kernel: [18744.968988] RIP: 0010:___slab_alloc+0x65/0x620 | |
Aug 26 22:23:27 Lenovo-IdeaPad-S145-15IWL kernel: [18744.968997] Code: 89 84 24 88 00 00 00 31 c0 4d 85 ff 0f 84 3c 01 00 00 83 fb ff 0f 84 8d 00 00 00 49 8b 07 48 c1 e8 36 89 44 24 3c 39 c3 75 6d <49> 8b 57 08 48 8d 42 ff 83 e2 01 49 0f 44 c7 48 8b 00 a8 20 0f 85 | |
Aug 26 22:23:27 Lenovo-Ide |
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
extern crate byteorder; | |
mod lib; | |
use byteorder::{ByteOrder, LittleEndian}; | |
use lib::vm; | |
use std::io::prelude::*; | |
use std::fs::File; |
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
fn do_primitive(&mut self) { | |
match self.current_data() & 0xCfffff { | |
0 => { | |
debug!("[ HALT ] : Stopping VM "); | |
self.set_running(false); | |
return; | |
} | |
1 => { | |
let top_1 = self.stack.pop(); | |
let top_2 = self.stack.pop(); |
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
pub struct VMStack { | |
internal_stack: Vec<i32>, | |
capacity: usize, | |
top: usize, //also size | |
} | |
impl VMStack { | |
pub fn new(stack_size: usize) -> VMStack { | |
VMStack { capacity: stack_size, top: 0, internal_stack: Vec::with_capacity(stack_size) } | |
} |