Skip to content

Instantly share code, notes, and snippets.

Brion Vibber brion

View GitHub Profile
@brion
brion / Makefile
Created Feb 9, 2020
Test case for emscripten stray syscall issue
View Makefile
OPTS=-O3 -g1 --closure 1 -s NO_FILESYSTEM=1
test.js : lib.o test.o
emcc $(OPTS) -o test.js lib.o test.o
lib.o : lib.c lib.h
emcc $(OPTS) -c -o lib.o lib.c
test.o : test.c lib.h
emcc $(OPTS) -c -o test.o test.c
View gdm-session-fail.txt
: Traceback (most recent call last):
: File "/home/gnomedev/.local/bin/jhbuild", line 35, in <module>
: import jhbuild.main
: File "/home/gnomedev/.local/lib/python3.7/site-packages/jhbuild/main.py", line 23, in <module>
: import optparse
: File "/usr/lib64/python3.7/optparse.py", line 77, in <module>
: import textwrap
: File "/usr/lib64/python3.7/textwrap.py", line 8, in <module>
: import re
: File "/usr/lib64/python3.7/re.py", line 143, in <module>
@brion
brion / jhbuild-log.txt
Created Oct 28, 2019
jhbuild log failing in dconf
View jhbuild-log.txt
*** Building dconf *** [48/89]
ninja
[3/9] Linking target tests/gdbus-thread-leak.
FAILED: tests/gdbus-thread-leak
cc -o tests/gdbus-thread-leak 'tests/59830eb@@gdbus-thread-leak@exe/dbus-leak.c.o' -L/opt/gnome/lib -Wl,--as-needed -Wl,--no-undefined -Wl,--whole-archive -Wl,--start-group client/libdconf-client.a common/libdconf-common.a -Wl,--no-whole-archive -ggdb -O2 -fno-omit-frame-pointer gdbus/libdconf-gdbus-thread.a engine/libdconf-engine.a gvdb/libgvdb.a shm/libdconf-shm.a /opt/gnome/lib/libgio-2.0.so /opt/gnome/lib/libgobject-2.0.so /opt/gnome/lib/libglib-2.0.so -Wl,--end-group '-Wl,-rpath,$ORIGIN/../gdbus:$ORIGIN/../engine:$ORIGIN/../gvdb:$ORIGIN/../shm' -Wl,-rpath-link,/home/brion/.cache/jhbuild/build/dconf/gdbus -Wl,-rpath-link,/home/brion/.cache/jhbuild/build/dconf/engine -Wl,-rpath-link,/home/brion/.cache/jhbuild/build/dconf/gvdb -Wl,-rpath-link,/home/brion/.cache/jhbuild/build/dconf/shm
/usr/bin/ld: common/libdconf-common.a(dconf-changeset.c.o): in function `dconf_changeset_new':
/home/brion/
@brion
brion / Makefile
Created Oct 25, 2019
Demo of Linux 'strip' command damaging emscripten .a files
View Makefile
CFLAGS=
all : b.js
clean :
rm -f a.o b.o liba.a b.js b.wasm
a.o : a.c a.h
emcc $(CFLAGS) -c -o a.o a.c
View rustup.strace
10 execve("/home/brion/.cargo/bin/rustup", ["/home/brion/.cargo/bin/rustup", "update"], 0x7ffdaf9364f0 /* 15 vars */) = 0
10 brk(NULL) = 0x558a99603000
10 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
10 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
10 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
10 fstat(3, {st_mode=S_IFREG|0644, st_size=70008, ...}) = 0
10 mmap(NULL, 70008, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f85b2d61000
10 close(3) = 0
10 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
10 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
@brion
brion / gist:fda801c7e44ba63382e06602b21f631a
Created Jun 11, 2019
strace of `notepad.exe Cargo.toml` in WSL on arm64
View gist:fda801c7e44ba63382e06602b21f631a
$ strace notepad.exe Cargo.toml
execve("/mnt/c/WINDOWS/system32/notepad.exe", ["notepad.exe", "Cargo.toml"], 0x7fffedf9b8f8 /* 19 vars */) = 0
set_tid_address(0xc2828) = 101
brk(NULL) = 0x1e4f000
brk(0x1e50000) = 0x1e50000
sched_getaffinity(0, 128, [0, 1, 2, 3, 4, 5, 6, 7]) = 64
uname({sysname="Linux", nodename="aarchie", ...}) = 0
getpid() = 101
getcwd("/home/brion/src/png/mtpng", 4096) = 26
openat(AT_FDCWD, "/dev/lxss", O_RDWR|O_LARGEFILE) = 3
View output.txt
$ make
emcc -O1 -g4 -s WASM_OBJECT_FILES=0 -c -o test.o test.c
shared:DEBUG: EM_CONFIG is located in /home/brion/.emscripten
shared:DEBUG: TEMP_DIR not defined in /home/brion/.emscripten, using /tmp
shared:DEBUG: PYTHON not defined in /home/brion/.emscripten, using "/usr/bin/python"
shared:DEBUG: JAVA not defined in /home/brion/.emscripten, using "java"
emscripten:DEBUG: Cache: PID 5591 acquiring multiprocess file lock to Emscripten cache at /home/brion/.emscripten_cache
emscripten:DEBUG: Cache: done
emscripten:DEBUG: Cache: PID 5591 released multiprocess file lock to Emscripten cache at /home/brion/.emscripten_cache
shared:DEBUG: check tells us to use wasm backend
View cdef_filter_block_c.wast
(func $_cdef_filter_block_c (; 407 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) (param $9 i32) (param $10 i32)
(local $11 i32)
(local $12 i32)
(local $13 i32)
(local $14 i32)
(local $15 i32)
(local $16 i32)
(local $17 i32)
(local $18 i32)
(local $19 i32)
@brion
brion / async-bench.js
Created Jan 12, 2019
Quick bench of a loop that does an async/await call on every iteration
View async-bench.js
"use strict";
class Bench {
constructor() {
this.x = 0;
this.iters = 1000000;
}
ms() {
return Date.now();
@brion
brion / run-aarch64.sh
Created Jan 7, 2019
Fedora aarch64 QEMU system image runner script
View run-aarch64.sh
#!/bin/bash
# Starter script for Fedora aarch64 in QEMU, cobbled from various sources.
# Requires qemu-system-aarch64 to be installed.
# Configuration options:
IMAGE=fedora-29-aarch64.img
RAM=2048
CPUS=4
You can’t perform that action at this time.