Skip to content

Instantly share code, notes, and snippets.

@sayrer
sayrer / fuzz.txt
Created April 2, 2021 19:46
rustls fuzzer error
#1037 NEW cov: 1052 ft: 1304 corp: 104/46Kb lim: 4673 exec/s: 0 rss: 54Mb L: 67/4673 MS: 1 InsertByte-
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
left: `[22, 3, 3, 0, 61, 2, 0, 0, 57, 3, 131, 171, 190, 6, 44, 207, 146, 134, 173, 2, 80, 54, 227, 19, 164, 138, 158, 225, 58, 30, 53, 130, 187, 17, 140, 108, 19, 62, 178, 31, 124, 179, 189, 0, 192, 47, 0, 0, 17, 255, 1, 0, 1, 0, 0, 11, 0, 4, 3, 0, 1, 2, 0, 35, 0, 0]`,
right: `[22, 3, 3, 0, 61, 2, 0, 0, 57, 3, 131, 171, 190, 6, 44, 207, 146, 134, 173, 2, 80, 54, 227, 19, 164, 138, 158, 225, 58, 30, 53, 130, 187, 17, 140, 108, 19, 62, 178, 31, 124, 179, 189, 48, 192, 47, 0, 0, 17, 255, 1, 0, 1, 0, 0, 11, 0, 4, 3, 0, 1, 2, 0, 35, 0, 0]`', fuzzers/message.rs:15:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
==5268== ERROR: libFuzzer: deadly signal
#0 0x555807294171 (/home/runner/work/rustls/rustls/fuzz/target/x86_64-unknown-linux-gnu/release/message+0x1cf171)
#1 0x5558076c54d6 (/home/runner/work/
@sayrer
sayrer / build.txt
Created March 30, 2021 18:14
verbose build
$ ../bazel/bazel-bin/src/bazel-dev build --compilation_mode=opt //cpp:hello_world --verbose_failures --announce_rc --sandbox_debug --verbose_failures --incompatible_enable_cc_toolchain_resolution
INFO: Invocation ID: 0db93c47-d278-472b-aefa-f7ac46a0d143
INFO: Streaming build results to: https://app.buildbuddy.io/invocation/0db93c47-d278-472b-aefa-f7ac46a0d143
INFO: Options provided by the client:
Inherited 'common' options: --isatty=1 --terminal_columns=304
INFO: Reading rc options for 'build' from /home/sayrer/github/grafica/crustls/.bazelrc:
'build' options: --bes_results_url=https://app.buildbuddy.io/invocation/ --bes_backend=grpcs://cloud.buildbuddy.io --remote_cache=grpcs://cloud.buildbuddy.io --remote_timeout=3600 --remote_executor=grpcs://cloud.buildbuddy.io --remote_header=x-buildbuddy-api-key=5G91vGMX57lwry1l0QGD --host_platform=//:docker_image_platform --platforms=//:docker_image_platform --extra_toolchains=@llvm_toolchain//:cc-toolchain-linux
DEBUG: /home/sayrer/.cache/bazel/_bazel_sayrer/8e5e0
@sayrer
sayrer / WORKSPACE
Created March 29, 2021 21:39
Loading Grail's llvm_toolchain with a Chromium sysroot
# Change master to the git tag you want. |
http_archive( |
name = "com_grail_bazel_toolchain", |
strip_prefix = "bazel-toolchain-master", |
sha256 = "060d02182794e39033987c4f0b043c653154621ae9d01420aca1a9b63175447a", |
urls = ["https://github.com/grailbio/bazel-toolchain/archive/master.tar.gz"], |
)
@sayrer
sayrer / Dockerfile
Created March 26, 2021 23:23
Hello World deps
FROM ubuntu:focal
RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y apt-utils
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libtinfo5
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y clang-10
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libxml2
# Inherited 'build' options: --bes_results_url=https://app.buildbuddy.io/invocation/ --bes_backend=grpcs://cloud.buildbuddy.io --remote_cache=grpcs://cloud.buildbuddy.io --remote_timeout=3600 --remote_executor=grpcs://cloud.buildbuddy.io --remote_header=x-buildbuddy-api-key=5G91vGMX57lwry1l0QGD --host_platform=//:docker_image_platform --platforms=//:docker_image_platform --extra_toolchains=@llvm_toolchain//:cc-toolchain-linux
@sayrer
sayrer / Dockerfile
Created March 26, 2021 23:11
Almost works
ROM ubuntu:focal
RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y apt-utils
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libtinfo5
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y clang-10
@sayrer
sayrer / Dockerfile
Created March 26, 2021 22:56
Almost working cc_binary
FROM ubuntu:focal |Warning (initialization): Unable to access `user-emacs-directory' (~/.emacs.d/).
|Any data that would normally be written there may be lost!
RUN DEBIAN_FRONTEND=noninteractive apt-get update |If you never want to see this message again,
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y apt-utils |customize the variable `user-emacs-directory-warning'.
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libtinfo5
@sayrer
sayrer / Dockerfile
Created March 26, 2021 19:54
Dockerfile that will work for building cargo-raze
FROM ubuntu:focal
RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y apt-utils
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y ca-certificates
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y gcc
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y g++
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y autotools-dev
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y automake
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y make
@sayrer
sayrer / twitter-text.h
Created March 23, 2021 17:08
cxx-generated header
#pragma once
#include "cxx.h"
#include <algorithm>
#include <array>
#include <cstddef>
#include <cstdint>
#include <initializer_list>
#include <iterator>
#include <memory>
#include <new>
hn.svelte.dev % npx svelte-kit build --verbose
vite v2.1.0 building for production...
✓ 33 modules transformed.
.svelte/output/client/_app/manifest.json 1.80kb
.svelte/output/client/_app/pages/index.svelte-97f32c64.js 0.21kb / brotli: 0.14kb
.svelte/output/client/_app/pages/about.svelte-6eab05c1.js 2.95kb / brotli: 1.03kb
.svelte/output/client/_app/pages/user/[name].svelte-0c683a11.js 2.88kb / brotli: 1.18kb
.svelte/output/client/_app/pages/item/[id].svelte-945c828d.js 6.71kb / brotli: 2.21kb
.svelte/output/client/_app/assets/start-4d95db90.css 2.13kb / brotli: 0.64kb
.svelte/output/client/_app/pages/[list]/[page].svelte-601f25e2.js 6.05kb / brotli: 2.15kb
sayrer:twitter_text sayrer$ bazel test //rust/...
INFO: Analyzed 18 targets (0 packages loaded, 0 targets configured).
INFO: Found 11 targets and 7 test targets...
INFO: Elapsed time: 0.311s, Critical Path: 0.01s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
//rust/conformance:autolink_test (cached) PASSED in 3.8s
//rust/conformance:emoji_test (cached) PASSED in 35.5s
//rust/conformance:extract_test (cached) PASSED in 5.2s
//rust/conformance:hit_highlighting_test (cached) PASSED in 0.4s