Commit Graph

14 Commits

Author SHA1 Message Date
Nathaniel Filardo
c7d509e418 test/func/malloc: align check as size_t
If the test happens as uintptr_t on CHERI, then we attempt to construct
a capability and use a capability-based test rather than an
integer-based one, and things go south.
2019-11-26 15:50:22 +00:00
Nathaniel Filardo
0b47145526 test/func/malloc: posix_memalign vs. size_t
posix_memalign requires that the alignment parameter be a multiple of
sizeof(uintptr_t), but the test begins with alignments as small as
sizeof(size_t).  While those are very likely the same value out in the
wild right now, they're not on CHERI.

Begin the test loop at sizeof(uintptr_t) and add a test that a request
for a reasonable amount of memory but with an alignment of
sizeof(uintptr_t)/2 fails with EINVAL.
2019-11-26 15:50:22 +00:00
Matthew Parkinson
16b084f501 Changed abort behaviour for Windows CI. 2019-08-13 15:37:54 +01:00
Matthew Parkinson
6151b7a9b2 Make test_realloc not leak in failure case. 2019-08-13 13:03:06 +01:00
Matthew Parkinson
a32882cd55 Make malloc functional test check for leaks. 2019-08-13 13:03:06 +01:00
Matthew Parkinson
7a8eaec2cc Made a sizecass_t to wrap the sizeclass
This is useful as codegen is nicer if we use size_t, but the semantics
is uint8_t, and is stored as that in many places in the metadata.
Ultimately should introduce a wrapper to check this invariant.
2019-07-01 14:30:05 +01:00
Matthew Parkinson
5030fff9bd Missing include from test. 2019-04-29 11:02:47 +01:00
Matthew Parkinson
e7d90966f6 Made the malloc tests run on Windows 2019-02-15 14:36:47 +00:00
Theo Butler
a3fb2b9531 cleanup some tests 2019-02-14 22:31:45 -05:00
Theo Butler
057595a57e remove -1 check in calloc 2019-02-13 16:03:38 -05:00
Theo Butler
942313fec7 replace asserts with abort 2019-02-13 10:03:41 -05:00
Theo Butler
24ba068dce remove randomness from malloc tests 2019-02-13 08:42:51 -05:00
theodus
a9615bc6aa mark variables unused in release build 2019-02-12 20:22:10 -05:00
Theo Butler
f6497e6ee3 Add malloc tests 2019-02-12 19:50:15 -05:00