[main] replace computed value by a constant
authorMiguel de Icaza <miguel@gnome.org>
Wed, 15 Jun 2016 06:24:48 +0000 (23:24 -0700)
committerMiguel de Icaza <miguel@gnome.org>
Wed, 15 Jun 2016 06:25:30 +0000 (23:25 -0700)
commitab73f54d42fc46f6b50ef8c9e13d9892385c7df1
treebddacec8450717770c1cf9eec9e35d5238dd626d
parent3e22f8a53fc0e69f137ee5969256a3fe7b9c2f6e
[main] replace computed value by a constant

The reason why mkbundle is not working is that for some reason
this constant expression is producing different code than the
-24 that it is supposed to.

What is odd is that the return value from the lseek system
call is the same, but yet, read fails with an end-of-file with
this value, and otherwise it passes.

With this call:

     lseek (fd, -(16+sizeof(uint64_t)), SEEK_END)

strace displays:

lseek(0x3, 0xFFFFFFE8, 0x2)  = 19375512 0

With this call:

     lseek (fd, -24, SEEK_END)

strace displays:

lseek(0x3, 0xFFFFFFFFFFFFFFE8, 0x2)  = 19375512 0

Now, while both results from lseek are the same, a subsequent read
with 24 bytes to read returns zero on the former case, and 24 on
the latter case.
mono/mini/main.c