Bug#570889: #570889 ant: FTBFS on kfreebsd-* and hppa: Bus error

Carlos O'Donell carlos at systemhalted.org
Fri Feb 26 07:02:08 UTC 2010


On Fri, Feb 26, 2010 at 3:14 AM, Petr Salinger <Petr.Salinger at seznam.cz> wrote:
> My point is a different one, see in #570889.
>
> 14997 gij-4.4  CALL  open(0x8e59e58,O_RDONLY|O_LARGEFILE,<unused>0)
> 14997 gij-4.4  NAMI ".../defaults.properties"
> 14997 gij-4.4  RET   open 10/0xa
> 14997 gij-4.4  CALL  fstat(0xa,0xbfbf29ec)
> 14997 gij-4.4  STRU  size=1701
> 14997 gij-4.4  RET   fstat 0
> 14997 gij-4.4  CALL  mmap(0,0x2000,PROT_READ,MAP_PRIVATE,0xa,0,0)
> 14997 gij-4.4  RET   mmap 712716288/0x2a7b3000
> 14997 gij-4.4  PSIG  SIGBUS SIG_DFL
>
> The ant/gij-4.4 mmaps 8192 bytes from file of size 1701
> on architecture with pagesize 4096.

If ant mmap's a file that has only 1701 bytes, on an architecture with
page size of 4906, then any access beyond the first page will cause a
SIGBUS.

POSIX mmap says:
* The system will zero-fill a partial page at the end of an object.
Thus bytes 1701->4095 are zero-filled.
* Access to any whole page past the end of an object shall result in
SIGBUS. Thus access to bytes 4096->8192 will result in a SIGBUS.

If ant is accessing whole pages beyond the length of the object (not
the length of the required mmap) then this is a bug.

Cheers,
Carlos.





More information about the pkg-java-maintainers mailing list