On 1/3/22 02:52, Paul Eggert wrote: > On 1/2/22 16:28, Bernhard Voelker wrote: >> 1073741858: that's 2^30 +34 > > Could it be an address, or part of an address, that is incorrectly > treated as an integer? A mistake like that is quite plausible given the > "does it return char * or int?" API of strerror_r.
no, that number is ERANGE: (gdb) p ERANGE $4 = 1073741858 (gdb) p EINVAL $12 = 1073741846 and in the 3rd iteration, we get: (gdb) p ret $8 = 0 (gdb) p buf $9 = "E\000", '^' <repeats 97 times> (gdb) p err $10 = -3 (gdb) p i $11 = 2 and the following ASSERT aborts the program. Have a nice day, Berny