]> sourceware.org Git - glibc.git/commit
String: test-memcpy used unaligned types for buffers [BZ 28572]
authorJohn David Anglin <danglin@gcc.gnu.org>
Tue, 7 Dec 2021 22:10:20 +0000 (16:10 -0600)
committerNoah Goldstein <goldstein.w.n@gmail.com>
Wed, 8 Dec 2021 04:19:50 +0000 (22:19 -0600)
commit409a73581687914ac0555f6a468469578f97e70f
tree603be0d62bd4056da9c314feb6e4b30a6362bbae
parentcbab7f726877badc5059316e7248be7c3bff9d96
String: test-memcpy used unaligned types for buffers [BZ 28572]

commit d585ba47fcda99fdf228e3e45a01b11a15efbc5a
Author: Noah Goldstein <goldstein.w.n@gmail.com>
Date:   Mon Nov 1 00:49:48 2021 -0500

    string: Make tests birdirectional test-memcpy.c

Add tests that had src/dst non 4-byte aligned. Since src/dst are
initialized/compared as uint32_t type which is 4-byte aligned this can
break on some targets.

Fix the issue by specifying a new non-aligned 4-byte
`unaligned_uint32_t` for src/dst.

Another alternative is to rely on memcpy/memcmp for
initializing/testing src/dst. Using memcpy for initializing in memcpy
tests, however, could lead to future bugs.

Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
string/test-memcpy-support.h
This page took 0.044476 seconds and 5 git commands to generate.