A developer who uses the 1997 Enlightenment E16 window manager daily tracked down a 20-year-old infinite loop bug that caused the desktop to freeze when opening a PDF with a long title. The root cause was a Newton's method-based text truncation loop in E16's text rendering code that could oscillate indefinitely between two states without converging, due to missing iteration limits and no floor on the step size. The fix adds a 32-iteration cap, floors nuke_count at 1 to prevent degenerate strings, and floors the average character width at 1 to prevent divide-by-zero. The post also includes a philosophical aside on old vs. new software reliability, touching on the XZ Utils backdoor and a recent Linux 6.6.y stable kernel regression.
Table of contents
Introduction ⌗The bug ⌗The problematic function ⌗The fix ⌗Patch (against e16 1.0.30) ⌗Reproducer ⌗A philosophical detour that nobody asked for. ⌗Sort: