X-Chat X-Sys causes a floating point exception when /meminfo is used and no swap is mounted. Reproducible: Always Steps to Reproduce: 1. As root "swapoff" all your swap 2. Fire up X-Chat with X-Sys and join a channel 3. Type /meminfo Actual Results: Floating point exception. Boom no more X-Chat. Expected Results: Memory stats to be displayed
Created attachment 133554 [details, diff] Proposed fix Enhances X-Chat X-Sys's /meminfo callback, makes the string formatting a lot more robust and handles the special case for when no swap is mounted.
Thank you for both finding the bug and patching it. This code is refactored in my 2.2.0 development branch, I'll make sure to test for the same bug in 2.2 before releasing anything. As I want to preemptively fix up the audacious dependency at the same time, I'm awaiting the Alpha arch team before I will commit this. Intended changes: +*xchat-xsys-2.1.0-r2 (16 Oct 2007) + + 16 Oct 2007; Tony Vroon <chainsaw@gentoo.org> + +files/2.1.0-fix-meminfo-swapoff.patch, xchat-xsys-2.1.0-r1.ebuild, + +xchat-xsys-2.1.0-r2.ebuild: + Fix floating point exception with no swap mounted. Bug found and patched by + Emopig <andrew@nelless.net>, closes bug #195966. Preemptively fix + dependencies so the 2.1 branch will not be built against Audacious 1.4, this + would fail.
This is done, thanks! :)