summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Moore <Robert.Moore@intel.com>2021-12-08 13:03:44 -0800
committerGitHub <noreply@github.com>2021-12-08 13:03:44 -0800
commit7797b6ada03251c4f59e73eda85055ff0bcdd8db (patch)
treef3484feb56045dd2eb68f34605c8afacf7414c50
parent6de0131ecd6b1f507cc8ab2a9b09cfd1fc4db3e9 (diff)
parentbc08cde8ffe45d1a7f2c32ed72e719c58eec4bcb (diff)
downloadacpica-7797b6ada03251c4f59e73eda85055ff0bcdd8db.tar.gz
Merge pull request #721 from jrtc27/local-cache-calloc-align
iASL: Fix unaligned accesses to local cache allocations
-rw-r--r--source/compiler/aslcache.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/compiler/aslcache.c b/source/compiler/aslcache.c
index 51e6f4c46..05ae19b74 100644
--- a/source/compiler/aslcache.c
+++ b/source/compiler/aslcache.c
@@ -183,6 +183,11 @@ UtLocalCacheCalloc (
UINT32 CacheSize = ASL_STRING_CACHE_SIZE;
+#ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED
+ /* Used for objects other than strings, so keep allocations aligned */
+ Length = ACPI_ROUND_UP_TO_NATIVE_WORD (Length);
+#endif
+
if (Length > CacheSize)
{
CacheSize = Length;