What | Removed | Added |
---|---|---|
CC | martin.liska@suse.com |
So I did analysis of 2 packages before the changes in Factory happened: 1) gzip - as mentioned a temp file was used and zipped. Temp file name probably causes the divergence as it's always different. 2) sed - it uses pthreads (but not passed as CFLAGS), thus I added -fprofile-update=atomic to cflags. See documentation here: https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html and I've got it, diff in between 2 runs: ./gnulib-tests/nanosleep.gcda: a3000000: 37:PROGRAM_SUMMARY checksum=0x99d0fa93 [snip] ./gnulib-tests/nanosleep.gcda: 01a10000: 14:COUNTERS arcs 7 counts ./gnulib-tests/nanosleep.gcda: 0 2 1 1 0 1 29 30 ./gnulib-tests/nanosleep.gcda: a3000000: 37:PROGRAM_SUMMARY checksum=0xc3046d04 [snip] ./gnulib-tests/nanosleep.gcda: 0 2 1 1 0 1 30 31 ./lib/stat-time.h: stat_time_normalize (int result, struct stat *st _GL_UNUSED) { #if defined __sun && defined STAT_TIMESPEC if (result == 0) { long int timespec_resolution = 1000000000; short int const ts_off[] = { offsetof (struct stat, st_atim), offsetof (struct stat, st_mtim), offsetof (struct stat, st_ctim) }; int i; for (i = 0; i < sizeof ts_off / sizeof *ts_off; i++) { struct timespec *ts = (struct timespec *) ((char *) st + ts_off[i]); long int q = ts->tv_nsec / timespec_resolution; long int r = ts->tv_nsec % timespec_resolution; if (r < 0) { r += timespec_resolution; q--; } ts->tv_nsec = r; /* Overflow is possible, as Solaris 11 stat can yield tv_sec == TYPE_MINIMUM (time_t) && tv_nsec == -1000000000. INT_ADD_WRAPV is OK, since time_t is signed on Solaris. */ if (INT_ADD_WRAPV (q, ts->tv_sec, &ts->tv_sec)) { errno = EOVERFLOW; return -1; } } } #endif return result; } It loops based on how fast time flies. This can't be stable.