Skip to content

Instantly share code, notes, and snippets.

View nwg's full-sized avatar

Nathaniel W Griswold nwg

  • Greater Milwaukee Area
View GitHub Profile
@nwg
nwg / pfdump.sh
Created June 26, 2021 05:32 — forked from vitaly/pfdump.sh
script to dump PF status
#!/bin/bash
function pfprint() {
if [ -n "$2" ];then
sudo pfctl -a "$2" -s"$1" 2>/dev/null
else
sudo pfctl -s"$1" 2>/dev/null
fi
}
;; --- begin straight.el setup
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name
"straight/repos/straight.el/bootstrap.el"
user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
$rip=0x0000000112aff31b
memory region $rip
[0x0000000112aff000-0x0000000112b1a000) rwx
malloc_history 28499 0x0000000112aff31b
VM_ALLOC 0x112aff000-0x112b00fff [size=8192]: [thread 0x700000aa4000]: | 0x102f9f160 (snap-test2) mmapForLinker | 0x7fff5f38e97c (libsystem_kernel.dylib) mmap
vmmap 28499
VM_ALLOCATE 0000000112a6f000-000000011303c000 [ 5940K 5940K 5940K 0K] rwx/rwx SM=PRV
1) Download haskell platform and install: https://haskell.org/platform/download/8.6.3/Haskell%20Platform%208.6.3%20Core%2064bit-signed.pkg
2) cabal new-install snap
3) mkdir /tmp/snap-test
4) cd /tmp/snap-test
5) $HOME/.local/bin/snap init
5.2) edit snap-test.cabal and remove -threaded and -O2 and add -g
6) cabal new-build -fdevelopment
6.2) cabal new-run
7) (direct browser to 0.0.0.0:8000)
8) (click on 'create a new user')
(lldb) thread list
Process 25688 stopped
thread #1: tid = 0x554ad, 0x00007fff5f3907de libsystem_kernel.dylib`__psynch_cvwait + 10, queue = 'com.apple.main-thread'
thread #2: tid = 0x554c3, 0x00007fff5f390eae libsystem_kernel.dylib`__semwait_signal + 10
thread #3: tid = 0x554c4, 0x00007fff5f393716 libsystem_kernel.dylib`kevent + 10
thread #4: tid = 0x554c5, 0x00007fff5f3952ee libsystem_kernel.dylib`poll + 10
thread #5: tid = 0x554c6, 0x00007fff5f3907de libsystem_kernel.dylib`__psynch_cvwait + 10
thread #6: tid = 0x554c7, 0x00007fff5f3907de libsystem_kernel.dylib`__psynch_cvwait + 10
* thread #7: tid = 0x554c8, 0x00000001134f931b, stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
[ 0] 849F3F04-C0A4-37F7-9899-5401F0BBD44F 0x0000000100000000 /Users/griswold/project/snap-test2/dist-newstyle/build/x86_64-osx/ghc-8.6.3/snap-test2-0.1/build/snap-test2/snap-test2
[ 1] 289AB27E-F09F-3384-A14A-100431139559 0x00000001053b0000 /usr/lib/dyld
[ 2] 25F4A1F5-6551-312F-B397-C8D45ACC530A 0x00007fff5c6d5000 /usr/lib/libSystem.B.dylib
[ 3] 15F7B40A-424C-33BB-BF2C-7E8195128B78 0x00007fff5f052000 /usr/lib/libz.1.dylib
[ 4] 2B715386-F391-3835-909F-A6DD86DCB4E3 0x00007fff5dbb3000 /usr/lib/libncurses.5.4.dylib
[ 5] 9FB95807-7C62-32B7-A19F-946D7FB7CCA6 0x00007fff5d4ec000 /usr/lib/libiconv.2.dylib
[ 6] 43F7E100-F5D1-36AB-A26E-CF94196A19C0 0x00007fff5c990000 /usr/lib/libcharset.1.dylib
[ 7] 704331AC-E43D-343A-8C24-39201142AF27 0x00007fff5f0d5000 /usr/lib/system/libcache.dylib
[ 8] 9C865644-EE9A-3662-AB77-7C8A5E561784 0x00007fff5f0da000 /usr/lib/system/libcommonCrypto.dylib
[ 9] 817772E3-E836-3FFD-A39B-BDCD1C357221 0x00007fff5f0e5000 /usr/lib/system/libcompiler_rt.dylib
Process: snap-test2 [1926]
Path: /Users/USER/*/snap-test2
Identifier: snap-test2
Version: 0
Code Type: X86-64 (Native)
Parent Process: bash [476]
Responsible: snap-test2 [1926]
User ID: 503
Date/Time: 2018-12-29 14:34:32.911 -0600
Process 1825 stopped
* thread #5, stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
frame #0: 0x00000001120f931b
-> 0x1120f931b: movaps 0x7e6(%rip), %xmm0
0x1120f9322: movups %xmm0, 0x88(%rbx)
0x1120f9329: movaps 0x7e8(%rip), %xmm0
0x1120f9330: movups %xmm0, 0x98(%rbx)
Target 0: (snap-test2) stopped.
(lldb) bt
* thread #5, stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
open("users.json\0", 0x20205, 0x1B6) = 16 0
fstat64(0x10, 0x4201B0A420, 0x0) = 0 0
ftruncate(0x10, 0x0, 0x0) = 0 0
ioctl(0x10, 0x4004667A, 0x70000A675DD4) = -1 Err#25 (ENOTTY)
-- #define FIODTYPE _IOR('f', 122, int) /* get d_type */
[ENOTTY] fildes is not associated with a character special device.
-OR-
[ENOTTY] The specified request does not apply to the kind of object that the descriptor fildes references.
constraints: any.Cabal ==2.4.0.1,
any.HUnit ==1.6.0.0,
any.StateVar ==1.1.1.1,
any.adjunctions ==4.4,
any.aeson ==1.4.2.0,
aeson -bytestring-builder -cffi -developer -fast,
any.array ==0.5.3.0,
any.attoparsec ==0.13.2.2,
attoparsec -developer,
any.base ==4.12.0.0,