Check for misaligned memory in compile error code

We now check that mem alloc for error message is aligned, and
fail with an appropriate message in the compile error.
This commit is contained in:
Matthew Barr
2016-07-27 16:55:28 +10:00
parent cded5552c2
commit b8d33732b5
3 changed files with 71 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, Intel Corporation
* Copyright (c) 2015-2016, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -98,6 +98,12 @@ extern "C"
* The library was unable to allocate temporary storage used during
* compilation time.
*
* - *Allocator returned misaligned memory*
*
* The memory allocator (either malloc() or the allocator set with @ref
* hs_set_allocator()) did not correctly return memory suitably aligned
* for the largest representable data type on this platform.
*
* - *Internal error*
*
* An unexpected error occurred: if this error is reported, please contact