Turn one warning into an error with -Werror=return-type
Make a missing return fatal without turning every warning into an error, using -Werror=return-type on GCC 14, where it matters most.
Short posts that solve one thing: the code, the output we got, and why it works.
Make a missing return fatal without turning every warning into an error, using -Werror=return-type on GCC 14, where it matters most.
Make UBSan in Clang 18 stop at the first undefined behaviour with -fno-sanitize-recover=undefined, instead of printing and carrying on.
List the root device with the ro option in /etc/fstab so an embedded board's root filesystem is mounted read-only, and a power cut cannot corrupt it.
Stop speculative reads after a bounds check with _mm_lfence from immintrin.h, the barrier Intel recommends against Spectre variant 1.
Pull readable text out of a binary with strings -n 8 to skip short noise, a first look for keys, URLs and debug messages in a file you did not build.
Read whether UEFI Secure Boot is active on a running Linux system with mokutil --sb-state, and see when shim has turned validation off.
Call prctl(PR_SET_NO_NEW_PRIVS) on Linux 3.5 or later so execve can never grant more privilege, which also lets unprivileged code install seccomp filters.
Turn a raw fuzzer byte buffer into integers, ranges and strings with FuzzedDataProvider from LLVM's libFuzzer headers instead of parsing by hand.
Set ASAN_OPTIONS=detect_leaks=1 to make AddressSanitizer report leaked allocations at exit, on platforms where leak checking is not on by default.
Tell Firecracker 1.10 which kernel to boot, and with what command line, by sending PUT /boot-source over its Unix socket before the microVM starts.
Use __builtin_mul_overflow in GCC 14 or Clang to multiply two sizes and learn whether the product wrapped, before it reaches malloc.
Build with GCC 14 and -fcf-protection=full to emit endbr64 landing pads and shadow-stack-compatible code for Intel CET on x86-64, and count the markers.
We send one email when a new post is published. No spam.