Re: Bug#1107330: openbabel: autopkgtest uses incredible amount of memory on s390x

Pranav P <[email protected]>
Newsgroups gmane.linux.debian.ports.s390
Message-ID <SJ0PR15MB58114796323961FAF20411E7A05AA@SJ0PR15MB5811.namprd15.prod.outlook.com>
Hi Paul,

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.

I will update on the same as soon as I find anything.

Thanks,
Pranav
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.