NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/57141 (Bug in swab())



Synopsis: Bug in swab()

State-Changed-From-To: open->feedback
State-Changed-By: kre%NetBSD.org@localhost
State-Changed-When: Wed, 28 Dec 2022 14:46:03 +0000
State-Changed-Why:
This should be fixed in HEAD now (though I am not sure how long
it will take to propogate to the git repository).

I will request pullups to NetBSD 8, 9, and 10_BETA soon.

However note that:

   NetBSD's implementation incorrectly rounds n to a multiple of 8,

is not really a correct chacterisation of the problem, n is the
input arg (number of bytes), the value being rounded was n/2,
which is just an inprementation technique to make less loop iterations
in cases where n is large.

It was indeed being done incorrectly however.   Thanks for the report.

Note also that most of the common NetBSD supported architectures don't
use that version of swap() - they instead use an archtecture specific
version written in assembler.

Please let us know if the updated version (once it becomes available)
seems OK.





Home | Main Index | Thread Index | Old Index