[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: test-strerror_r fails on GNU/Hurd
From: |
Bernhard Voelker |
Subject: |
Re: test-strerror_r fails on GNU/Hurd |
Date: |
Mon, 3 Jan 2022 23:41:57 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 |
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