Skip to content

Instantly share code, notes, and snippets.

View vext01's full-sized avatar
🏠
Working from home

Edd Barrett vext01

🏠
Working from home
View GitHub Profile
@vext01
vext01 / log.txt
Created March 7, 2023 11:00
cffi imports
cd /usr/ports/pobj/pypy-7.3.11/pypy3.9-v7.3.11-src && LD_LIBRARY_PATH=. LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include LD_LIBRARY_PATH=. PYTHONPATH=/usr/ports/pobj/pypy-7.3.11/pypy3.9
-v7.3.11-src/lib_pypy ./pypy3.9-c lib_pypy/pypy_tools/build_cffi_imports.py
/usr/ports/pobj/pypy-7.3.11/pypy3.9-v7.3.11-src/lib-python/3/hashlib.py:181: RuntimeWarning: The _hashlib module is not available, falling back to a much slower implementation (No module named '_
pypy_openssl')
warnings.warn("The _hashlib module is not available, falling back "
ERROR:root:code for hash blake2b was not fou
@vext01
vext01 / compileall.txt
Last active March 6, 2023 22:31
pypy stuff
$ LD_LIBRARY_PATH=`pwd`/pypy/goal ./pypy/goal/pypy3.9-c -m compileall ./pypy/lib_pypy
debug: WARNING: Library path not found, using compiled-in sys.path, with
debug: WARNING: sys.prefix = '/usr/ports/pobj/pypy-7.3.11/pypy3.9-v7.3.11-src'
debug: WARNING: Make sure the pypy3 binary is kept inside its tree of files.
debug: WARNING: It is ok to create a symlink to it from somewhere else.
Traceback (most recent call last):
File "/usr/ports/pobj/pypy-7.3.11/pypy3.9-v7.3.11-src/lib-python/3/runpy.py", line 200, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/ports/pobj/pypy-7.3.11/pypy3.9-v7.3.11-src/lib-python/3/runpy.py", line 87, in _run_code
exec(code, run_globals)
arrakis:edd> doas btrace trace.bt 44773
tracing pid 44773
[1671642769235478231 +1671642769235478231] tid=313009 >>>20
[1671642769235482014 +3783] tid=313009 >>>46
[1671642769235516315 +34301] tid=313009 >>>86
[1671642769235464974 +1671642769235464974] tid=313009 <<<4
[1671642769235478799 +13825] tid=313009 <<<20
[1671642769235509958 +31159] tid=313009 <<<46
[1671642769235539757 +23442] tid=313009 >>>119
[1671642769235541846 +2089] tid=313009 >>>103
@vext01
vext01 / linux.s
Created December 14, 2022 12:53
sem_destroy()
00000000000106d0 <sem_destroy@@GLIBC_2.2.5>:
106d0: 31 c0 xor %eax,%eax
106d2: c3 retq
@vext01
vext01 / blurb.md
Last active May 12, 2022 14:48
Stackmap legalisation

Stackmap legalisation

Goal

The goal is to fix llvm/llvm-project#21657

TLDR: Passing illegally-typed live variable operands to

diff --git a/llvm/include/llvm/CodeGen/ISDOpcodes.h b/llvm/include/llvm/CodeGen/ISDOpcodes.h
index ea1d3170acba..531edff27c70 100644
--- a/llvm/include/llvm/CodeGen/ISDOpcodes.h
+++ b/llvm/include/llvm/CodeGen/ISDOpcodes.h
@@ -1269,6 +1269,9 @@ enum NodeType {
#define BEGIN_REGISTER_VP_SDNODE(VPSDID, ...) VPSDID,
#include "llvm/IR/VPIntrinsics.def"
+ // The `llvm.experimental.stackmap` intrinsic.
+ STACKMAP,
diff --git a/bin/run_docker_ci_job b/bin/run_docker_ci_job
index bfd5689..4936468 100755
--- a/bin/run_docker_ci_job
+++ b/bin/run_docker_ci_job
@@ -26,13 +26,16 @@ run_image() {
# Image name must be unique to the buildbot worker so that workers don't clash.
image_tag=${LOGNAME}-${repo}-${suffix}
+ # The container will be run as the worker's "host user". The image is
+ # expected to create a user with the same UID.
diff --git a/llvm/include/llvm/CodeGen/ISDOpcodes.h b/llvm/include/llvm/CodeGen/ISDOpcodes.h
index ea1d3170acba..531edff27c70 100644
--- a/llvm/include/llvm/CodeGen/ISDOpcodes.h
+++ b/llvm/include/llvm/CodeGen/ISDOpcodes.h
@@ -1269,6 +1269,9 @@ enum NodeType {
#define BEGIN_REGISTER_VP_SDNODE(VPSDID, ...) VPSDID,
#include "llvm/IR/VPIntrinsics.def"
+ // The `llvm.experimental.stackmap` intrinsic.
+ STACKMAP,
@vext01
vext01 / gist:45f407724b08212a9683512acd9473cb
Last active January 25, 2022 09:31
FAT32 filename casing woes

On OpenBSD machine, fdisk and newfs a USB disk with a FAT32 (0x0c) filesystem, mount it with default options and:

# touch a B aaaaa BBBBB longlonglong OPENBSD_OPENBSD
# ls
B                BBBBB            OPENBSD_OPENBSD  a                aaaaa            longlonglong

Now unmount it and take it to a Debian 11 box, and mount with default options:

arrakis:edd> gnutls-cli irc.blitzed.org:6697
Processed 123 CA certificate(s).
Resolving 'irc.blitzed.org:6697'...
Connecting to '85.119.83.150:6697'...
- Successfully sent 0 certificate(s) to server.
- Server has requested a certificate.
- Certificate type: X.509
- Got a certificate list of 4 certificates.
- Certificate[0] info:
- subject `CN=*.blitzed.org', issuer `CN=R3,O=Let's Encrypt,C=US', serial 0x0462b636d0aa4de3da3cc05422a1ad6b085b, RSA key 4096 bits, signed using RSA-SHA256, activated `2021-11-01 18:22:47 UTC', expires `2022-01-30 18:22:46 UTC', pin-sha256="GBGqeJehosOF0XMyYVU4Eyc2kcj/Uf9+tYcylkgoEx8="