Skip to content

Instantly share code, notes, and snippets.

#include <stdint.h>
#include <stdio.h>
template<typename T> T get_bits(T value, unsigned msb, unsigned lsb) {
return (value >> lsb) & ((1 << (msb - lsb + 1)) - 1);
}
template<typename T, unsigned N = (sizeof(T) * 8)> int log2(T value) {
unsigned i = 0;
while (i < N && (value >>= 1)) {
// Author: Agustin Gianni (agustingianni@gmail.com).
// License: BSD variant "if you steal my shit i'll cut you".
#include <iostream>
#include <random>
#include <limits>
#include <cassert>
#include <cstdio>
using namespace std;
// Small utility to measure how much time does it take to
// run an arbitrary function.
// Written by Agustin Gianni (agustin.gianni@gmail.com).
// Based on https://ngathanasiou.wordpress.com/2015/04/01/benchmarking-in-c/
//
// $ clang++ measure.cpp -o measure -std=c++11 -Wall && ./measure
// Return value: Boom!
// Elapsed time: 0 ms
#include <ctime>
#include <chrono>
//
// Created by Agustin Gianni on 11/18/16.
//
#ifndef THREADPROFILER_DISKPOOL_H
#define THREADPROFILER_DISKPOOL_H
#include <atomic>
#include <string>
#include <cstddef>
#!/usr/bin/env bash
export SAMPLES_DIR=/Users/anon/workspace/fuzzing/tests
export TEST_PROGRAM=/Users/anon/workspace/retools/build/src/tools/binary_info/binary_info
export AFL_PATH=/Users/anon/Downloads/afl-2.35b
export MINIMIZED_SAMPLES_DIR=$SAMPLES_DIR/minimized
mkdir fuzzing_build
pushd fuzzing_build
import sys
#sys.path.append("C:\\Program Files (x86)\\Microsoft Research\\Z3-4.1\\python")
from z3 import *
s=Solver()
x=BitVec("x", 64)
y=BitVec("y", 64)
w=BitVec("w", 64)
#!/bin/sh
# Download and build OS X Mavericks XNU Source
if [ ! -d "dtrace-118" ]; then
curl -O http://opensource.apple.com/tarballs/dtrace/dtrace-118.tar.gz
tar zxf dtrace-118.tar.gz
rm dtrace-118.tar.gz
fi
if [ ! -d "AvailabilityVersions-6" ]; then
curl -O http://opensource.apple.com/tarballs/AvailabilityVersions/AvailabilityVersions-6.tar.gz
tar zxf AvailabilityVersions-6.tar.gz
#include <iostream>
#include <libdebug/Debugger.h>
#include <string>
using namespace std;
using namespace lldb;
int main(int argc, char** argv)
{
if (argc < 1) {
#ifndef DEBUGGER_H_
#define DEBUGGER_H_
#include <map>
#include <string>
#include <vector>
#include <Conditionals.h>
#include <lldb/API/LLDB.h>
#include <optional.h>
This file has been truncated, but you can view the full file.
{
"operation": [
"CheckFPAdvSIMDEnabled64();",
"bits(datasize) operand = V[n];",
"bits(datasize) result;",
"integer element;",
"",
"for e = 0 to elements-1",
" element = SInt(Elem[operand, e, esize]);",
" if neg then",