XPost: linux.debian.bugs.dist
Hi,
On Mon, Jul 28, 2025 at 02:52:15PM +0000, Pranav P via Debichem-devel wrote:
I was currently looking into this package.
In line no. 166 of getinchi.cpp there is a while loop that goes like the following:
while((ch=is.get())!=EOF)
Here ch is of type char. Whether char is signed or unsigned depends on
the implementation. Looks like in s390x char is of unsigned nature
and the value of EOF is -1. Hence the condition always evaluates to
true (255 != -1) causing the control to be trapped inside the loop
resulting in the memory hog. Changing the variable's declaration to
unsigned char seems to fix the memory consumption issue. But I am
still seeing the autopkgtest as failed due to some other reason.
Good catch - but I am quite surprised it now hit so hard - according to
git blame, that line (and anything around it) hasn't been changed for 18
years, and I guess the autopkgtest have been in place for a while as
well?
Michael
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)