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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <setjmp.h> | |
int mode = 0; | |
jmp_buf jb; | |
static const char* label[] = {"auto/set", "auto/read", | |
"const/read", "static/set", "static/read", | |
"register/set", "register/read", "volatile/set", | |
"volatile/read", "normal/set", "normal/read"}; |
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
int main(int argc, char* argv[]) { | |
unsigned char c[1]; | |
static unsigned char s[1]; | |
char mode = argc == 2 ? argv[1][0] : '\0'; | |
for(int i = 0; ; i++){ | |
switch(mode) { | |
case '0': | |
c[0] = s[i]; | |
break; |
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
Last login: Wed Dec 18 11:19:03 on ttys001 | |
mzyy94:~ mzyy94$ cd /Volumes/RamDisk/ | |
mzyy94:RamDisk mzyy94$ gcc bus_error_test.c | |
mzyy94:RamDisk mzyy94$ ./a.out | |
ARRAY | |
mode: [auto/set] | |
Segmentation fault: 11 | |
mode: [auto/read] | |
Segmentation fault: 11 | |
mode: [const/read] |
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
Last login: Wed Dec 18 12:10:55 on ttys006 | |
mzyy94:~ mzyy94$ cd /Volumes/RamDisk/ | |
mzyy94:RamDisk mzyy94$ gcc -g bus_error.c | |
mzyy94:RamDisk mzyy94$ lldb -- a.out | |
Current executable set to 'a.out' (x86_64). | |
(lldb) settings set target.run-args 0 | |
(lldb) run | |
Process 67334 launched: '/Volumes/RamDisk/a.out' (x86_64) | |
Process 67334 stopped | |
* thread #1: tid = 0x50c5f, 0x0000000100000f43 a.out`main(argc=2, argv=0x00007fff5fbff838) + 115 at bus_error.c:9, queue = 'com.apple.main-thread, stop reason = EXC_BAD_ACCESS (code=2, address=0x100005000) |
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
(lldb) settings set target.run-args 0 | |
(lldb) run | |
There is a running process, kill it and restart?: [Y/n] | |
Process 31576 launched: '/Volumes/RamDisk/a.out' (x86_64) | |
Process 31576 stopped | |
* thread #1: tid = 0x61fc2, 0x0000000100000f43 a.out`main(argc=2, argv=0x00007fff5fbff838) + 115 at bus_error.c:9, queue = 'com.apple.main-thread, stop reason = EXC_BAD_ACCESS (code=2, address=0x100005000) | |
frame #0: 0x0000000100000f43 a.out`main(argc=2, argv=0x00007fff5fbff838) + 115 at bus_error.c:9 | |
6 for(int i = 0; ; i++){ | |
7 switch(mode) { | |
8 case '0': |
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
(lldb) settings set target.run-args 2 | |
(lldb) run | |
There is a running process, kill it and restart?: [Y/n] | |
Process 44396 launched: '/Volumes/RamDisk/a.out' (x86_64) | |
Process 44396 stopped | |
* thread #1: tid = 0x65861, 0x0000000100000f66 a.out`main(argc=2, argv=0x00007fff5fbff838) + 150 at bus_error.c:15, queue = 'com.apple.main-thread, stop reason = EXC_BAD_ACCESS (code=1, address=0x7fff5fc87000) | |
frame #0: 0x0000000100000f66 a.out`main(argc=2, argv=0x00007fff5fbff838) + 150 at bus_error.c:15 | |
12 s[i] = '\0'; | |
13 break; | |
14 case '2': |
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
.section __TEXT,__text,regular,pure_instructions | |
.globl _main | |
.align 4, 0x90 | |
_main: ## @main | |
.cfi_startproc | |
## BB#0: | |
pushq %rbp | |
Ltmp2: | |
.cfi_def_cfa_offset 16 | |
Ltmp3: |
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
~:$ ssh -l root localhost -p 2223 | |
The authenticity of host '[localhost]:2223 ([127.0.0.1]:2223)' can't be established. | |
RSA key fingerprint is 5e:80:92:fa:82:60:05:09:89:c1:39:6b:72:30:d5:03. | |
Are you sure you want to continue connecting (yes/no)? yes | |
Warning: Permanently added '[localhost]:2223' (RSA) to the list of known hosts. | |
root@localhost's password: | |
Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2 x86_64 | |
The programs included with the Debian GNU/Linux system are free software; | |
the exact distribution terms for each program are described in the |
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
* { | |
margin: 0; | |
padding: 0; | |
overflow: hidden; | |
user-select: none; | |
-webkit-user-select: none; | |
} | |
body { | |
font-family: 'Lato' !important; | |
font-style: normal; |
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
if(!Detector.webgl) Detector.addGetWebGLMessage(); | |
function modelView(objName){ | |
var path = 'models/'; | |
var suffix = '_LOW'; | |
var extension = '.js'; | |
var renderer = new THREE.WebGLRenderer({ antialias: true, alpha: false, premultipliedAlpha: false }); | |
var s_x = window.innerWidth; | |
var s_y = window.innerHeight; |
OlderNewer