Dev Tools · 1h ago
Python log scanner silently disables size cap on stat() failure
A Python tool called SIEMForge has a log size cap that turns off when it can't measure the file, due to an exception handler that returns early. The bug means the 100MB limit is bypassed on permission errors or race conditions, potentially allowing memory exhaustion. The developer discovered the untested branch via coverage analysis and wrote a test to document the behavior.
Meridian48 take
The bug is a classic example of error handling that makes a safety feature less safe, but it's a minor issue in a niche tool; the real story is how coverage analysis caught it.
Read the full reporting
the size cap on my log scanner turns itself off exactly when it can't measure the file →
DEV Community
pythonbug