{ "tokens": { "input": 1786, "cache_read": 0, "cache_write": 1465, "output": 167 }, "reviews": [ { "key": [ "https://ftp.debian.org/debian/pool/main/p/packetq/packetq_1.8.0+dfsg.orig.tar.xz", "main packetq-1.8.0+dfsg/src/server.cpp:157:13: error:inconclusive: Non-local variable 'm_stream' will use object that points to local variable 'ptr'. [danglingLifetime]\n packetq-1.8.0+dfsg/src/server.cpp:258:44: note: Address of variable taken here.\n packetq-1.8.0+dfsg/src/server.cpp:258:44: note: Calling function 'push_front', 1st argument '&ptr[res]' value is lifetime=ptr\n packetq-1.8.0+dfsg/src/server.cpp:152:40: note: Passed to constructor of 'Buffer'.\n packetq-1.8.0+dfsg/src/server.cpp:152:39: note: Added to container 'm_stream'.\n packetq-1.8.0+dfsg/src/server.cpp:238:31: note: Variable created here.\n packetq-1.8.0+dfsg/src/server.cpp:157:13: note: Non-local variable 'm_stream' will use object that points to local variable 'ptr'." ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Buffer's constructor deep-copies the data with new[] and memcpy, so m_stream never holds a pointer to the caller's local 'ptr'. On top of that, the warning at line 157 (inside write()) was reached by carrying the lifetime of m_stream from push_front() at line 152 into a different member function. That cross-function forwarding is exactly what the PR stops for non-local variables. The removed warning was a false positive." } } ], "started": "2026-11-14 17:04:50 UTC", "runner": "pc" }