Debugging Ncurses to fix a Mutt segfault on Gentoo

This all started after a regular package upgrade on my Gentoo box: $ mutt Segmentation fault Meh, another breakage. This one already had a bug filed on the Gentoo bug tracker: #651552. However, there was no fix available yet. So time to rebuild with debug enabled (-ggdb3) and sources installed, disable PaX on the binary, […]

Cheap torification in C with self-applied LD_PRELOAD

So I was playing around with a lab for exploring the OpenSSL C API, and wanted to add a command-line flag to make connections go through Tor, so that I could e.g. fetch SSL certificates from .onion addresses. An easy way to do it would just have been to use torify, but I figured, why […]

Unwrapping a LZ4-compressed kernel

So I’m reinstalling my Gentoo system from scratch, and I want it to boot with UEFI and Secure Boot. That means I want to embed the kernel’s initramfs into the kernel image, so that the signature-checking performed by the firmware covers both the kernel and the initramfs. Roughly following Sakaki’s awesome EFI install guide, I […]

pkg-config chaining

Quick note: chaining pkg-config .pc files using the Requires: statement works. As in, flags from the required packages are indeed added to the flags for the requiring package, including -L flags (which I was wondering about in particular, w.r.t. PR Itseez/opencv#3792). This might seem obvious as that’s quite the purpose of this statement, but I […]

Locating program strings in memory

Disclaimer: I’m a total newbie to all this executable file format stuff. Slowly learning! The strings command lists all sufficiently long printable character strings in a file. I recently found myself needing to locate a string found in an ELF executable in the memory of the running program. strings did its job just fine in […]