Skip to content

Instantly share code, notes, and snippets.

global tids
global bytecount
global exes
probe syscall.read {
exes[tid()] = execname();
tids[tid()] = fd;
}
probe syscall.read.return {
function __task_file_handle_filp:long(task:long, fd:long) %{ /* pure */
struct task_struct *p = (struct task_struct *)((long)THIS->task);
struct files_struct *files;
struct file *filp;
rcu_read_lock();
if ((files = kread(&p->files))) {
if ((filp = fcheck_files(files, THIS->fd))) {
THIS->__retvalue = (long)filp;
}
function pid_file_handle_path:string(pid:long, fd:long) %{
struct task_struct *task = NULL;
struct pid *pid;
struct file *file;
struct path *path;
char buf[256];
char *p;
pid = find_get_pid((pid_t)(long)THIS->pid);
task = pid_task(pid, PIDTYPE_PID);
#!/bin/sh
python3.1 ./fbuild/fbuild-light $*
@erickt
erickt / webserver.flx
Created March 30, 2011 16:41
bug that exhibits code generation bug
Warning: typeclass IByteStream entry read_line is not virtual
bar/webserver.cpp: In member function ‘void* flxusr::webserver::aux::apply()’:
bar/webserver.cpp:107: error: ‘pc’ was not declared in this scope
compilation terminated due to -Wfatal-errors.
warning: no debug symbols in executable (-arch i386)
compile: stage2/std.o
generate: stage2/glue.o
rt: ---
rt: cd3c:main:main: rust: error: No input files allowed with --glue.
rt: cd3c:main:main: upcall fail 'explicit failure', ../rust/src/comp/driver/session.rs:90
rt: cd3c:main: domain main @0x2800000 root task failed
rt: ---
rt: cd3c:main:main: rust: error: Multiple input filenames provided.
rt: cd3c:main:main: upcall fail 'explicit failure', ../rust/src/comp/driver/session.rs:90
$ CXX='g++ -m32' CC='gcc -m32' CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 ./configure --disable-bindings --{build,host,target}=i686-apple-darwin --enable-targets=x86,x86_64,cbe --enable-optimized
$ make
$ make install
{
"query":{
"bool":{
"must":[
{
"fuzzy":{
"ipaddress":{
"value":"1.2.3.4"
}
}
if (pSetFileCompletionNotificationModes) {
if (pSetFileCompletionNotificationModes((HANDLE) socket,
FILE_SKIP_SET_EVENT_ON_HANDLE |
FILE_SKIP_COMPLETION_PORT_ON_SUCCESS)) {
handle->flags |= UV_HANDLE_SYNC_BYPASS_IOCP;
} else if (GetLastError() != ERROR_INVALID_FUNCTION) {
uv__set_sys_error(loop, GetLastError());
return -1;
}
}
[2011-12-12 16:15:24,777][DEBUG][action.search.type ] [Stevie Hunter] Failed to execute fetch phase
java.lang.ArrayIndexOutOfBoundsException: 193
at org.elasticsearch.search.fetch.FetchPhase.execute(FetchPhase.java:132)
at org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:434)
at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:314)
at org.elasticsearch.action.search.type.TransportSearchScrollQueryThenFetchAction$AsyncAction.executeFetchPhase(TransportSearchScrollQueryThenFetchAction.java:206)
at org.elasticsearch.action.search.type.TransportSearchScrollQueryThenFetchAction$AsyncAction.access$1000(TransportSearchScrollQueryThenFetchAction.java:80)
at org.elasticsearch.action.search.type.TransportSearchScrollQueryThenFetchAction$AsyncAction$3.onResult(TransportSearchScrollQueryThenFetchAction.java:174)
at org.elasticsearch.action.search.type.TransportSearchScrollQueryThenFetchAction$AsyncAction$3.onResult(Tran