I’m curious: is it the same code on a GNU/Linux system?
Also, assuming this is the thing which you mentioned earlier: do you have test data which causes that path to be executed? Do you have test data which can cause a failure on a real system?

Some more background. The problem involves a certain code path which when executed results in undefined behaviour. Now it so happens that this undefined behaviour is in practice always harmless, but that’s only by luck. If the memory layouts should shift, then it could be worse.

@NickB: I have yet to look at the code on GNU/Linux.

The naughty code path is invoked on practically every invocation of the utility.