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 / gist:d43e7591d01cee91a8b7df65ba241c42
Created August 14, 2020 17:26
12.1-releng build failure
ERROR: ctfconvert: rpc_commondata.o doesn't have type data to convert
ERROR: ctfconvert: div.o doesn't have type data to convert
/usr/src/sys/kern/subr_capability.c:255:29: error: incomplete definition of type 'struct cap_rights_init_args'
cap_rights_t *rights = cria->cria_rights;
~~~~^
/usr/src/sys/kern/subr_capability.c:254:9: note: forward declaration of 'struct cap_rights_init_args'
struct cap_rights_init_args *cria = arg;
^
/usr/src/sys/kern/subr_capability.c:257:52: error: incomplete definition of type 'struct cap_rights_init_args'
__cap_rights_init(CAP_RIGHTS_VERSION, rights, cria->cria_value1,
@dmilith
dmilith / src.patch
Created August 14, 2020 10:13
Patch for sys/vm/vm_map.h for 12-stable/master
--- sys/vm/vm_map.h.orig 2020-08-14 12:10:43.380509000 +0200
+++ sys/vm/vm_map.h 2020-08-14 11:44:16.398386000 +0200
@@ -206,6 +206,7 @@
vm_flags_t flags; /* flags for this vm_map */
vm_map_entry_t root; /* Root of a binary search tree */
pmap_t pmap; /* (c) Physical map */
+ vm_offset_t anon_loc;
int busy;
};
@dmilith
dmilith / 12-releng master
Last active August 13, 2020 14:51
12-releng/master and 12.-releng/master build failures
--------------------------------------------------------------
>>> stage 3.1: building everything
--------------------------------------------------------------
/λ/src/12/sys/dev/pst/pst-iop.c:199:3: warning: cast to 'void (*)(struct iop_softc *, u_int32_t, struct i2o_single_reply *)' (aka 'void (*)(struct iop_softc *, unsigned int, struct i2o_single_reply *)') from smaller integer type 'u_int32_t' (aka 'unsigned
int') [-Wint-to-pointer-cast]
((void (*)(struct iop_softc *, u_int32_t, struct i2o_single_reply *))
^
/λ/src/12/sys/dev/pst/pst-iop.c:421:9: warning: cast to 'struct iop_request *' from smaller integer type 'u_int32_t' (aka 'unsigned int') [-Wint-to-pointer-cast]
(struct iop_request *)reply->transaction_context;
^
@dmilith
dmilith / dmesg
Created July 26, 2020 16:03
Details of dmesg, repo and branch
---<<BOOT>>---
[1] Copyright (c) 2013-2019 The HardenedBSD Project.
[1] Copyright (c) 1992-2020 The FreeBSD Project.
[1] Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
[1] The Regents of the University of California. All rights reserved.
[1] FreeBSD is a registered trademark of The FreeBSD Foundation.
[1] FreeBSD 12.1-STABLE-HBSD VerKnowSys amd64
[1] FreeBSD clang version 10.0.0 (git@github.com:llvm/llvm-project.git llvmorg-10.0.0-0-gd32170dbd5b)
[1] VT(vga): text 80x25
[1] HardenedBSD: initialize and check features (__HardenedBSD_version 1200060 __FreeBSD_version 1201520).
[44] KDB: stack backtrace:
[44] #0 0xffffffff8098a9d5 at kdb_backtrace+0x65
[44] #1 0xffffffff80947790 at vpanic+0x180
[44] #2 0xffffffff809475a3 at panic+0x43
[44] #3 0xffffffff80951fdd at _sleep+0x3dd
[44] #4 0xffffffff80952331 at pause_sbt+0xf1
[44] #5 0xffffffff804fa177 at e1000_reset_hw_82540+0x177
[44] #6 0xffffffff804f114b at em_if_stop+0x1b
[44] #7 0xffffffff80a43a71 at iflib_stop+0xc1
[44] #8 0xffffffff80a50d6c at iflib_if_ioctl+0x39c
===> lib/librpcsvc (all)
/λ/src/12/sbin/ifconfig/ifbridge.c:66:36: error: use of undeclared identifier 'STP_STATES'
static const char *stpstates[] = { STP_STATES };
^
/λ/src/12/sbin/ifconfig/ifbridge.c:67:35: error: use of undeclared identifier 'STP_PROTOS'
static const char *stpproto[] = { STP_PROTOS };
^
/λ/src/12/sbin/ifconfig/ifbridge.c:68:35: error: use of undeclared identifier 'STP_ROLES'
static const char *stproles[] = { STP_ROLES };
^
@dmilith
dmilith / updater.sh
Created June 29, 2020 08:11
Quickly update rust-analyzer-mac on macOS 10.15
update_rust_analyzer () {
if [ ! -f "${HOME}/Downloads/rust-analyzer-mac" ]; then
echo "Download recent version from: https://github.com/rust-analyzer/rust-analyzer/releases first!"
return 1
fi
mv "${HOME}/Downloads/rust-analyzer-mac" "/usr/local/bin/rust-analyzer-mac"
xattr -r -d com.apple.quarantine "/usr/local/bin/rust-analyzer-mac"
chmod 755 "/usr/local/bin/rust-analyzer-mac"
killall rust-analyzer-mac
}
{
"auto_complete_selector": "source - (comment, string.quoted)",
// "auto_complete_triggers":
// [
// {
// "characters": ".",
// "selector": "source.rust"
// },
// {
// "characters": "::",
{
"auto_show_diagnostics_panel": false,
"clients":
{
"rls":
{
"command":
[
"rustup",
"run",
#include <iostream>
#include <unistd.h>
using namespace std;
void oil_leak() {
int size = 5000000;
char* buffer = new char[size + 1];
}