Open bmwiedemann opened 2 days ago
Thanks for that. Do you know if other applications using libexiv2 suffer a similar problem? I'm assuming it's a problem in libexiv2 itself, but I'll investigate further next week.
I did not see any others so far... but OTOH most projects don't run as many automated tests as python does.
I've found the problem with test_DateValue
. It's checking the result of DateValue.toRational
, which is of type Exiv2.Rational
.
https://exiv2.org/doc/classExiv2_1_1DateValue.html#a9897cf9cee63d3f4d073db3c2d0ad355
Exiv2.Rational
is defined as a pair of int32_t
.
https://exiv2.org/doc/namespaceExiv2.html#a03e01c8ca5f7a70f166db6b05115bef7
For most sensible uses of Exiv2.Rational
this is quite sufficient, so I don't expect the exiv2 project would welcome any attempt to change it. There is no sensible reason to want a UNIX timestamp as a rational number, so I may just remove this from the Python interface.
The problem with test_TimeValue
is similar.
https://exiv2.org/doc/classExiv2_1_1TimeValue.html#a3f35dfcf48c850030e57e960e32085ea
While working on reproducible builds for openSUSE I found that our python-exiv2 fails 2 tests (on x86_64) when run after the 0x7fffffff 31-bit overflow of the signed UNIX epoch (count of seconds since 1970)
In Debian and openSUSE, you can reproduce it with
And maybe using
faketime
can also trigger the issue.