Skip to content

Instantly share code, notes, and snippets.

View dmilith's full-sized avatar
🤓
Calculating infinity…

Daniel (dmilith) Dettlaff dmilith

🤓
Calculating infinity…
View GitHub Profile
@dmilith
dmilith / stderr.log
Created January 7, 2024 14:59
Python 3.12 Freebsd 14.0 aarch64 Clang failure
Expected<T> must be checked before access or destruction.
Expected<T> value was in success state. (Note: Expected<T> values in success mode must still be checked prior to being destroyed).
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang -pthread -c -fno-strict-overflow -DNDEBUG -fuse-ld=lld -ferror-limit=1 -fstack-protector -Wformat -Wformat-securExpected<T> must be checked before access or destruction.
Expected<T> value was in success state. (Note: Expected<T> values in success mode must still be checked prior to being destroyed).
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang -pthread -c -fno-strict-overflow -DNDEBUG -fuse-ldi=tlyl d- W-lf,e-rzr,orre-llriomit=1 -fstack-protector -Wformat -Wformat-security -Wl,-z,relro,-,-z,now -I
@dmilith
dmilith / gist:55543f6cc9723c0a8f6a2f89b69fe152
Created July 22, 2022 08:21
MacOS 12.5 crashed while it was in sleep
panic(cpu 1 caller 0xfffffe002fdd6cb4): Sleep transition timed out after 35 seconds while calling power state change callbacks.
Debugger message: panic
Memory ID: 0x6
OS release type: User
OS version: 21G72
Kernel version: Darwin Kernel Version 21.6.0: Sat Jun 18 17:05:47 PDT 2022; root:xnu-8020.140.41~1/RELEASE_ARM64_T8101
Fileset Kernelcache UUID: 1B6A9A19F30D3D636657319AEC2B01CA
Kernel UUID: FF524A4D-776A-34EB-ABA6-048536FEB512
iBoot version: iBoot-7459.141.1
secure boot?: YES
@dmilith
dmilith / wezterm.lua
Last active September 16, 2023 21:38
Wezterm Nightly configuration dmilith
local wezterm = require 'wezterm';
local mux = wezterm.mux
local act = wezterm.action
local MY_EDITOR = "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
return {
default_cwd = "/Volumes/Projects",
@dmilith
dmilith / run.sh
Last active June 30, 2022 15:21
Accelerated Qemu VM on M1 mac
# install special build of Qemu
brew tap uenob/qemu-hvf
brew install --head qemu-hvf
# run it, here 12G RAM, A72 arm64 case:
/opt/homebrew/opt/qemu-hvf/bin/qemu-system-aarch64 \
-M virt,accel=hvf,highmem=off \
-m 12288 \
-smp cores=4 \
-cpu cortex-a72 \
@dmilith
dmilith / BSD setup-zfs-and-share.sh
Created June 17, 2022 17:58
NFSv4 server on FreeBSD 13.1 and the macOS 12.4 client setup
zfs set sharenfs="-alldirs" MyZFSPoolName
zfs share -a
service rpcbind start
service statd start
service lockd start
service nfsuserd start
service nfscbd start
service nfsd start
Mar 4 12:45:31 cb4-bh syslogd: kernel boot file is /boot/kernel/kernel
Mar 4 12:45:31 cb4-bh kernel: [1114880] panic: vm_fault: fault on nofault entry, addr: 0xfffffe02f1800000
Mar 4 12:45:31 cb4-bh kernel: [1114880] cpuid = 7
Mar 4 12:45:31 cb4-bh kernel: [1114880] time = 1614858252
Mar 4 12:45:31 cb4-bh kernel: [1114880] __HardenedBSD_version = 1200060 __FreeBSD_version = 1202000
Mar 4 12:45:31 cb4-bh kernel: [1114880] version = FreeBSD 12.2-RELEASE-HBSD VerKnowSys
Mar 4 12:45:31 cb4-bh kernel: [1114880] KDB: stack backtrace:
Mar 4 12:45:31 cb4-bh kernel: [1114880] #0 0xffffffff80daf88d at kdb_backtrace+0x7d
Mar 4 12:45:31 cb4-bh kernel: [1114880] #1 0xffffffff80d3e98e at vpanic+0x23e
Mar 4 12:45:31 cb4-bh kernel: [1114880] #2 0xffffffff80d3e750 at vpanic+0
[46800] Fatal trap 9: general protection fault while in kernel mode
[46800] cpuid = 6; apic id = 06
[46800] instruction pointer = 0x20:0xffffffff81169e77
[46800] stack pointer = 0x28:0xfffffe00cb24a4d0
[46800] frame pointer = 0x28:0xfffffe00cb24a4f0
[46800] code segment = base 0x0, limit 0xfffff, type 0x1b
[46800] = DPL 0, pres 1, long 1, def32 0, gran 1
[46800] processor eflags = interrupt enabled, resume, IOPL = 0
[46800] current process = 77056 (zio_read_intr_0_5)
[46800] trap number = 9
WITH_REPRODUCIBLE_BUILD=1
WITH_CLANG=1
WITH_CLANG_IS_CC=1
WITH_CCACHE_BUILD=1
WITH_LLD=1
WITH_LLD_BOOTSTRAP=1
WITH_LLD_IS_LD=1
WITH_LLVM_LIBUNWIND=1
WITH_GH_BC=1
#include <stdio.h>
#include <stddef.h>
#include <wchar.h>
#include <locale.h>
int main () {
setlocale(LC_ALL, "en_US.UTF-8");
const wchar_t* wc = L"👌";
int length = wcswidth(wc, 1);
printf("%ls, length: %d\n", wc, length);
#include <stdio.h>
#include <stddef.h>
#include <wchar.h>
#include <locale.h>
int main () {
//const wchar_t* wc = L'👌';
const char* wc = L"👌";
int length = wcswidth(wc, 1);