strace fails to build it's tests on arm-linux-gnueabihf with 64bit time_t
Bug #2060805 reported by
Matthias Klose
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
strace |
Fix Released
|
Unknown
|
|||
strace (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
strace fails to build it's tests on arm-linux-gnueabihf with 64bit time_t
Related branches
~paelzer/ubuntu/+source/strace:lp-2060805-time_t-conversions
Merged
into
ubuntu/+source/strace:ubuntu/noble-devel
at
revision 7a9ca60fbf363dda49a1c4a18d31055ea736c32c
- Canonical Server Reporter: Pending requested
- git-ubuntu import: Pending requested
-
Diff: 127 lines (+95/-1)4 files modifieddebian/changelog (+7/-0)
debian/control (+2/-1)
debian/patches/fix-time_t-conversion.patch (+85/-0)
debian/patches/series (+1/-0)
tags: | added: ftbfs |
Changed in strace: | |
status: | Unknown → New |
tags: | added: update-excuse |
Changed in strace: | |
status: | New → Fix Released |
To post a comment you must log in.
Per check in ubuntu-release no one started to look into this so far.
I'm unsure if I can complete it with all the other release related things, but I'll leave what I've found here.
Strace defines an own time type in [1]
$ cat tests/kernel_ old_timespec. h KERNEL_ LONG_T == 4 || defined LINUX_MIPSN32 old_timespec_ t;
...
typedef struct {
# if SIZEOF_
int
# else
long long
# endif
tv_sec, tv_nsec;
} kernel_
...
The conflict now is that on 32bit that boils down to int on e.g. armhf, but with 64 bit time_t that no more matches.
Due to that some assignments of ... (time_t) 0x1234LL can break if the static value is exceeding int.
Many places then later changed in [2] to not use time_t anymore and now usually make it use typeof.
But the same pattern is yet unfixed in a few more spots in the tests: mq_sendrecv. c:198: .tv_sec = (time_t) 0xdeadfacebeeff 00dLL, mq_sendrecv. c:202: .tv_sec = (time_t) 0x7ea1fade7e57f aceLL, recvmmsg- timeout. c:60: ts->tv_sec = (time_t) 0xcafef00ddeadb eefLL; xselect. c:216: tv_in.tv_sec = (time_t) 0xcafef00ddeadb eefLL; xutimes. c:89: tv[1].tv_sec = (time_t) 0xcafef00ddeadb eefLL;
tests/
tests/
tests/
tests/
tests/
The first of them in build is in xselect and breaks the build via xselect. c: In function ‘main’: xselect. c:216:24: error: overflow in conversion from ‘long long int’ to ‘kernel_long_t’ {aka ‘long int’} changes value from ‘-3819351491602 432273’ to ‘-559038737’ [-Werror=overflow] eefLL;
../../tests/
../../tests/
216 | tv_in.tv_sec = (time_t) 0xcafef00ddeadb
| ^
Without rewriting how time is handled there, and probably failing by not understanding enough of the intricacies of the program and the tests, how about just applying the same fix to the other cases that are left. Trying that as a first angle of attack ...
[1]: https:/ /github. com/strace/ strace/ commit/ 891ab42b7015037 520a01042201d4d dc548c266d /github. com/strace/ strace/ commit/ 7178658ead8ccfe 196694dc5434f0f 37db8746b4
[2]: https:/