<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libpinyin.git/src/include, branch fuzzy-correct</title>
<subtitle>mirror of libpinyin.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/'/>
<entry>
<title>Fix code style</title>
<updated>2023-01-14T01:56:46+00:00</updated>
<author>
<name>Peng Wu</name>
<email>alexepico@gmail.com</email>
</author>
<published>2023-01-14T01:56:46+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=4730a921d7933af06f8292e3655d9b06be82b4d7'/>
<id>4730a921d7933af06f8292e3655d9b06be82b4d7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add license header to unaligned_memory.h</title>
<updated>2022-11-30T01:27:23+00:00</updated>
<author>
<name>Peng Wu</name>
<email>alexepico@gmail.com</email>
</author>
<published>2022-11-30T01:27:23+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=087a773a22935e33f9c616756ff8f963cfe3d6db'/>
<id>087a773a22935e33f9c616756ff8f963cfe3d6db</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update class MemoryChunk</title>
<updated>2022-11-29T08:33:03+00:00</updated>
<author>
<name>Peng Wu</name>
<email>alexepico@gmail.com</email>
</author>
<published>2022-11-29T08:33:03+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=0aa6b1dff140cd7bdc3f200752e1e9d8569680de'/>
<id>0aa6b1dff140cd7bdc3f200752e1e9d8569680de</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixup: fix build error</title>
<updated>2022-11-29T08:16:21+00:00</updated>
<author>
<name>Matias Larsson</name>
<email>matias.larsson@matthews.se</email>
</author>
<published>2022-11-25T12:06:20+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=df10f4f6f04cfe37e30b23e1da12dc3d2448559f'/>
<id>df10f4f6f04cfe37e30b23e1da12dc3d2448559f</id>
<content type='text'>
Add the new header file to noinst_HEADERS.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the new header file to noinst_HEADERS.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix libpinyin crash on ARMv7</title>
<updated>2022-11-29T08:16:21+00:00</updated>
<author>
<name>Matias Larsson</name>
<email>matias.larsson@matthews.se</email>
</author>
<published>2022-11-24T17:22:55+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=8bcea4710bd328ef74dc852d9fdffb3c47ed8abe'/>
<id>8bcea4710bd328ef74dc852d9fdffb3c47ed8abe</id>
<content type='text'>
Fix the alignment trap in get_unigram_frequency(). Fix also other
places where this same trap could happen (depending on compiler
and surrounding code).

The trap happened when the ARM GCC generated a SIMD instruction
(specifically VLDR) to load 32 bits in a single instruction, and
when the memory address was not aligned to 32 bits. VLDR traps if
the address is not aligned.

GCC generated the instruction because of the cast to uint32 from
the address. The fix is to allocate a uint32 variable in stack and
use memcpy to copy the data to that variable. This way we ensure
that appropriate instructions are generated.

**Links**

About the issue with GCC:
https://trust-in-soft.com/blog/2020/04/06/gcc-always-assumes-aligned-pointer-accesses/

How Linux does it:
https://elixir.bootlin.com/linux/v5.10.155/source/include/linux/unaligned/memmove.h#L13

ARM documentation:
https://documentation-service.arm.com/static/5f8dc043f86e16515cdbbc92?token=
    See 'A3.2.1 Unaligned data access'
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix the alignment trap in get_unigram_frequency(). Fix also other
places where this same trap could happen (depending on compiler
and surrounding code).

The trap happened when the ARM GCC generated a SIMD instruction
(specifically VLDR) to load 32 bits in a single instruction, and
when the memory address was not aligned to 32 bits. VLDR traps if
the address is not aligned.

GCC generated the instruction because of the cast to uint32 from
the address. The fix is to allocate a uint32 variable in stack and
use memcpy to copy the data to that variable. This way we ensure
that appropriate instructions are generated.

**Links**

About the issue with GCC:
https://trust-in-soft.com/blog/2020/04/06/gcc-always-assumes-aligned-pointer-accesses/

How Linux does it:
https://elixir.bootlin.com/linux/v5.10.155/source/include/linux/unaligned/memmove.h#L13

ARM documentation:
https://documentation-service.arm.com/static/5f8dc043f86e16515cdbbc92?token=
    See 'A3.2.1 Unaligned data access'
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix segmentation fault on ARMv7</title>
<updated>2022-11-29T08:16:21+00:00</updated>
<author>
<name>Matias Larsson</name>
<email>matias.larsson@matthews.se</email>
</author>
<published>2022-11-24T17:08:06+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=521340f02907dae96f6f13dbf7997a34ebe864f2'/>
<id>521340f02907dae96f6f13dbf7997a34ebe864f2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use abort function instead of assert macro</title>
<updated>2022-06-06T09:32:00+00:00</updated>
<author>
<name>Peng Wu</name>
<email>alexepico@gmail.com</email>
</author>
<published>2022-06-06T09:32:00+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=2323c59d337ca56c585a8b58b855e84938ecfc27'/>
<id>2323c59d337ca56c585a8b58b855e84938ecfc27</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update Makefile.am</title>
<updated>2022-05-30T05:44:50+00:00</updated>
<author>
<name>Peng Wu</name>
<email>alexepico@gmail.com</email>
</author>
<published>2022-05-30T05:44:50+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=eea629ed12aa44600e681427f543ef181a4653d0'/>
<id>eea629ed12aa44600e681427f543ef181a4653d0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Write pinyin_utils.h</title>
<updated>2022-05-30T05:41:48+00:00</updated>
<author>
<name>Peng Wu</name>
<email>alexepico@gmail.com</email>
</author>
<published>2022-05-30T05:41:48+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=caaeaf4f69869c272a9944b90e0a9fbbce6d2663'/>
<id>caaeaf4f69869c272a9944b90e0a9fbbce6d2663</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>improve autoconf for libpinyin.la and libzhuyin.la</title>
<updated>2019-11-28T08:20:19+00:00</updated>
<author>
<name>Peng Wu</name>
<email>pwu@redhat.com</email>
</author>
<published>2019-11-28T08:05:48+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pwu/public_git/libpinyin.git/commit/?id=648c5f863a43d3686dbea71a98ccd44a089a65c4'/>
<id>648c5f863a43d3686dbea71a98ccd44a089a65c4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
