Hi Sebastian,

On 23.08.2014 16:13, Sebastian Andrzej Siewior wrote:
On Fri, Aug 22, 2014 at 10:45:02PM +0200, Andreas Cadhalpun wrote:
On 21.08.2014 22:07, Sebastian Andrzej Siewior wrote:
- LFS
161: 00000000     0 FUNC    GLOBAL DEFAULT  UND ftruncate@GLIBC_2.0 (5)

the functions is defined as
        int ftruncate(int fd, off_t length);
so with off_t beeing 64bit there have to be to ftruncate() functions on
i386. So this looks like something in libclamav is still not doing what
it should. I will check this…

Perhaps it would be better to use ftruncate64.

Yes, but this is nothing you should specify. The define should do it. So just
digged a little into it.

We could define it:
#define ftruncate ftruncate64

I've been looking where that truncate() user is coming from and I did not find
a single user in the source.

Did you use codesearch? It finds 4 uses of ftruncate [1].

Looking at the library I've found that the user is
the resize_file() function from llvm [0]. This is where it got interresting
since we should use the external library.
Looking at the rules file I noticed that
        -with-system-llvm=/usr/bin/llvm-config
is used. I would *assume* that --with-sys… should be used instead. However the
configure output is the same.

It is a long option, so it should have two dashes, but it works with one as well.

Anyway, it looks like we linking llvm staticly instead of using the external
library. This isn't on purpose right?

I think it is on purpose, because clamav upstream didn't want to ship shared LLVM libraries... But for Debian it would be better, if it was dynamically linked. (Otherwise we don't benefit from bug fixes in LLVM minor versions without recompiling clamav.)

The external llvm was introduced in 0.98.1+dfsg-6 and for the i386 build
   11074880 Apr 24 06:52 0.98.1+dfsg-5/usr/lib/libclamav.so.6.1.20
   11823364 May  3 06:05 0.98.1+dfsg-6/usr/lib/libclamav.so.6.1.20

the library gained approx 730KiB. I guess this are the static llvm files.

I would say this is the size increase in the static LLVM files between version 2.8 and 3.3. The symbols detected by lintian as non-LFS have been present in 0.98.1+dfsg-5 as well.

Best regards,
Andreas


1: http://codesearch.debian.net/search?q=package%3Aclamav+ftruncate


_______________________________________________
Pkg-clamav-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-clamav-devel

Reply via email to