FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian GCC

 
 
LinkBack Thread Tools
 
Old 03-09-2010, 10:33 AM
Petr Salinger
 
Default Bug#571532: ant FTBFS on gcj architectures

notfixed 571542 1.8.0-3
found 571542 1.8.0-3
tags 571542 +patch
--

Hello.

The problem is that FileUtils.BUF_SIZE (8192)
is currently bigger than page size (4096) on
some architectures, the copied file is mmaped-in
and the code tries to access after end of a file.

The patch bellow will provide functional ant 1.8 on gij architectures
and you can provide -gcj packages again on all architectures.


It would also be nice if you can inform upstream(s)
about this issue.

Thanks in advance

Petr

--- src/main/org/apache/tools/ant/util/ResourceUtils.java
+++ src/main/org/apache/tools/ant/util/ResourceUtils.java
@@ -463,10 +463,15 @@
destChannel = out.getChannel();

long position = 0;
+ long bufsize = FileUtils.BUF_SIZE;
long count = srcChannel.size();
while (position < count) {
+ if (bufsize > (count - position))
+ {
+ bufsize = count - position;
+ }
position +=
- srcChannel.transferTo(position, FileUtils.BUF_SIZE,
+ srcChannel.transferTo(position, bufsize,
destChannel);
}
} finally {




--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: Pine.LNX.4.62.1003091122080.8198@sci.felk.cvut.cz" >http://lists.debian.org/Pine.LNX.4.62.1003091122080.8198@sci.felk.cvut.cz
 

Thread Tools




All times are GMT. The time now is 07:52 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org