Skip to content

Instantly share code, notes, and snippets.

View jclulow's full-sized avatar
🌃
Cats & kittens grab your mittens; taking you through the night & into the mystic

Joshua M. Clulow jclulow

🌃
Cats & kittens grab your mittens; taking you through the night & into the mystic
View GitHub Profile
CFILES = run.c nvjson.c
HDRS = nvjson.h
run: $(CFILES) $(HDRS)
gcc -o $@ $(CFILES) -lnvpair
@jclulow
jclulow / gist:6723753
Created September 27, 2013 03:26
PSARC 2008/769 Final Spec
Table of Content
1 General decription
1.1 Background Diagram
1.2 Traditional 512 byte sector size disk
1.3 Proposal on large sector size disk
1.4 Proposal on emulation mode
2 Technical description
2.1 The designs are based on the following assumptions
2.2 Change summary
3 Proposed solution in detail

So, int $3 debugging is alive and well in DTrace. Add USDT probes to your application:

var d = require('dtrace-provider');
var dtp = d.createDTraceProvider('int3-debug');
var p1 = dtp.addProbe('firing', 'char *');
dtp.enable();

setInterval(function () {
  p1.fire(function (p) {
#!/usr/sbin/dtrace -qCs
#pragma D option strsize=4k
syscall::exece:entry
{
this->index = -1;
this->argstr = "";
this->done = 0;
}
jclulow@jmcbook ~ $ node -e "console.log(new Buffer('some string').toString('base64'))"
c29tZSBzdHJpbmc=
jclulow@jmcbook ~ $ node -e "console.log(new Buffer('c29tZSBzdHJpbmc=', 'base64').toString())"
some string
diff --git a/heatmap.c b/heatmap.c
index 0423050..9afd2bd 100644
--- a/heatmap.c
+++ b/heatmap.c
@@ -78,13 +78,12 @@ print_time_markers(void)
int offs;
int mark = 0;
char *marker = NULL;
+ char marker[100];
The following diff prevents us from overrunning the buffer and corrupting the heap:
[root@ra ~]# ./json.d
BOOTING AT: Fri Nov 09 2012 18:00:50 GMT+0000 (UTC)
BOOTING AT: Fri Nov 09 2012 18:00:52 GMT+0000 (UTC)
BOOTING AT: Fri Nov 09 2012 18:00:53 GMT+0000 (UTC)
THE BOOT! 3
jacob 10
jingleheimer 10
schmidt 10
john 11
[16:48:48] < CIA-52> illumos (447cd34) Daniil Lunev: 3160 nfs:
OPEN_CONFIRM with non-regular file returns wrong error -
http://git.io/ogL94g
[16:48:48] < CIA-52> illumos (049d03d) Vitaliy Gusev: 3162 nfs: some
unusable code in nfs4_srv.c - http://git.io/zesxxQ
[16:48:48] < CIA-52> illumos (3fc1e28) Bryan Cantrill: 3210 ld should
tolerate SHT_PROGBITS for .eh_frame sections on amd64 -
http://git.io/Pk64_A
#!/usr/bin/env node
var exec = require('child_process').exec;
var jobs = [
'sleep 1',
'sleep 2',
'sleep 3',
'sleep 4',
'false',