[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

libsvn_subr/utf-test failure due to unaligned memory access

From: James McCoy <jamessan_at_jamessan.com>
Date: Sat, 3 Mar 2018 14:18:37 -0500

This test has been failing for some time on Debian's alpha buildd[0].
One of the alpha porters looked into it and gave a thorough diagnosis[1]
of the issue which basically boils down to: using a char* as
apr_uint16_t*/apr_int32_t* is going to result in unaligned access.

In a (much belated) reply[2], I proposed the attached patch which
memcpy()s the string to an array of the appropriate type before passing
it through to svn_utf__utf{16,32}_to_utf8(). I also took the
opportunity to consolidate the handing of counted and non-counted
conversions.

Does this look appropriate? If so, I can commit to trunk and nominate
for 1.10.

[0]: https://buildd.debian.org/status/logs.php?pkg=subversion&arch=alpha
[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=823133#22
[2]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=823133#27

Cheers,

-- 
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7  2D23 DFE6 91AE 331B A3DB

Received on 2018-03-03 20:18:46 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.