[PATCH] src/ext4_resize.c: set errno to 0 before the strtoull call

xuyang2018.jy@fujitsu.com xuyang2018.jy@fujitsu.com
Tue Jan 18 05:27:10 GMT 2022


on 2022/1/18 11:56, Theodore Ts'o wrote:
> On Tue, Jan 18, 2022 at 02:43:26AM +0000, xuyang2018.jy@fujitsu.com wrote:
>>> You're right of course, but out of curiosity, which C library are you
>>> using?
>> I use glibc-2.34.
>
> Hmm, ok.  I'm using glibc 2.31, and in this particular program, errno
> shouldn't have been set by any prior system call.  I'm guessing maybe
> it was something in crt0 which ended up setting errno?
It maybe a glibc bug.
I cc glibc mailing list and see whether they have met this problem.

@Florian

Now, I use glibc-2.34 and run the following program[1] but the errno is 
not 0 in the beginning. So is this a known bug on glibc-2.34(Theodore 
doesn't meet this problem on glicb-2.31)?

[1]https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/tree/src/ext4_resize.c

Best Regards
Yang Xu
>
> 						- Ted


More information about the Libc-alpha mailing list