-
andyf
danmcd - that's an interesting side-effect of the isatty() change that feels like a new bug
-
andyf
a successful call to printf() should not set errno
-
andyf
Filed issue 15294 (fenix)
-
fenix
BUG 15294: Successful *printf() calls should not set errno (In Progress)
-
fenix
-
tsoome_
hm. ::stack does not present proper number of function parameters:(
-
jbk
tsoome_: it should use ctf, but i think it's still capped at 6 if a function uses more
-
danmcd
andyf: If your bug is correct/actual/etc., then 15291 should be marked as a subset of yours.
-
danmcd
I couldn't reproduce it with a toy, FWIW. I suspect there needs to be long buffering or something.
-
danmcd
And it might be strerror for all I know?
-
tsoome_
jbk ah, that explains, this one had 8
-
jbk
yeah, it's actually a reason why I try to avoid writing functions with more than 6 arguments... yeah you can fish out the arguments from the stack, but it's kinda annoying
-
andyf
danmcd - I've added a test as part of
code.illumos.org/c/illumos-gate/+/2582
-
fenix
→ CODE REVIEW 2582: 15294 Successful *printf() calls should not set errno (NEW) |
illumos.org/issues/15294
-
andyf
The ZFS tests still needed fixing, they shouldn't assume errno is unchanged over other function calls
-
andyf
If you ran your toy and piped it through cat, it would probably have reproduced. The output needs to be not-a-TTY
-
gitomat
[illumos-gate] 15132 libsmb SMF initialization problem messages incorrect -- Andy Fiddaman <illumos⊙fn>
-
richlowe
andyf: I'm just catching up, but did you check for other people who isatty and don't preserve errno?
-
danmcd
Sonofabitch @andyf, you're right.
-
danmcd
When I'm back (firefighting has kept me from proper time off, so I'm extending what I'd planned into most/all of next week) I can test this in lieu of fenix illumos 15291
-
fenix
BUG 15291: zfs-tests errno flaws exposed by 15220 (New)
-
fenix
-
danmcd
(right now that only exists in the 20221229 branch of illumos-joyent).
-
danmcd
Okay back to being off...
-
andyf
richlowe - rmustacc did a survey of isatty() as part of issue 15220 (fenix) - we were the odd one out in terms of always preserving errno, and now we're aligned with what people expect (POSIX technically allows either).
-
fenix
BUG 15220: isatty should return reasonable errnos (Closed)
-
fenix
-
andyf
If that's what you're asking
-
richlowe
No, I'm asking whether there's other code like *rintf that maybe calls isatty inside itself, but doesn't expect errno
-
andyf
Ah, got it. I checked usr/src/lib/ and fixed up a couple of other callers in there as part of the same change.
-
andyf
I should probably add a second bug ID for that bit
-
andyf
I looked briefly through usr/src/cmd too, but not exhaustively.
-
gitomat
[illumos-gate] 15295 SMB services should check IPC caller privileges -- Gordon Ross <gwr⊙rc>