Commit Graph

630 Commits

Author SHA1 Message Date
Daniel Micay
8d61e63274 add comment about special small size classes 2022-01-16 20:50:49 -05:00
Daniel Micay
422ee78b3e reorganize pages.h header 2022-01-16 16:57:22 -05:00
Daniel Micay
3e312695e1 document clz64/log2u64 not being able to handle 0 2022-01-16 16:28:49 -05:00
Daniel Micay
81cf2f27a0 calculate slab size class instead of array loop 2022-01-16 16:18:14 -05:00
Daniel Micay
d8cb2d9f7a use consistent wrappers around clz/ffs 2022-01-16 15:39:59 -05:00
Daniel Micay
86f9c739ee define constant for u64 bit width 2022-01-16 15:06:36 -05:00
Daniel Micay
536f852538 reuse a single size alignment implementation 2022-01-16 14:44:28 -05:00
Daniel Micay
e814cf4f5c enable linking optimization for GNU linker 2022-01-16 12:18:00 -05:00
Daniel Micay
705211ef49 define UBSan flags for SHARED_FLAGS to reuse it 2022-01-16 11:50:55 -05:00
Daniel Micay
189d3362d5 enable sized deallocation ABI for consistency 2022-01-16 11:49:51 -05:00
Daniel Micay
e2bcf4a356 stop silencing constant logical operand warning
This was resolved by 3696f071a4.
2022-01-13 14:51:22 -05:00
Daniel Micay
d470ae56a5 switch Android build to C17 from C11 2022-01-13 14:48:56 -05:00
Daniel Micay
42b097f3b0 CONFIG_SEAL_METADATA is regularly tested now 2022-01-13 14:25:41 -05:00
Daniel Micay
17891d743e switch from c11 to c17 standard 2022-01-12 10:20:47 -05:00
Daniel Micay
efd71e70c7 update documentation based on light configuration 2022-01-12 08:58:00 -05:00
Daniel Micay
a6d27848af wrap overly long line 2022-01-12 08:44:39 -05:00
Daniel Micay
110126d7f0 README: fix path to configuration templates 2022-01-12 08:43:36 -05:00
Daniel Micay
a2bdb4da27 update gitignore for renamed / added tests 2022-01-12 08:41:21 -05:00
Daniel Micay
0c0561e563 update gitignore for config template system 2022-01-12 08:41:12 -05:00
Daniel Micay
5a577e9ee0 document configuration template system 2022-01-12 08:38:33 -05:00
Daniel Micay
b3372e1576 add configuration template system 2022-01-10 04:47:01 -05:00
jvoisin
052b756840 Fix two warnings 2022-01-09 08:50:46 -05:00
jvoisin
001eb0687b Fix an unused parameter warning 2022-01-04 12:16:53 -05:00
Daniel Micay
2a5662948e rename bitmap manipulation functions 2022-01-04 12:14:55 -05:00
Daniel Micay
d1c39edc9b use const for malloc_object_size API 2022-01-04 10:14:41 -05:00
Daniel Micay
aa1746a90d alloc_size attribute for legacy valloc function 2022-01-04 10:04:26 -05:00
Daniel Micay
f3efc26638 add malloc attribute where appropriate 2022-01-04 09:56:29 -05:00
jvoisin
78cbb964d4 Add alloc_size and alloc_align attributes
This should help a bit the compiler to emit better diagnostics and to improve
the correctness of `__builtin_object_size`.

See https://clang.llvm.org/docs/AttributeReference.html#alloc-size
and https://clang.llvm.org/docs/AttributeReference.html#alloc-align
2022-01-04 09:45:20 -05:00
jvoisin
36dfed3354 Add aarch64 to the CI 2022-01-04 09:45:00 -05:00
Daniel Micay
8a500088c6 add missing include for overflow tests 2022-01-03 21:24:31 -05:00
Daniel Micay
c50d06bc6a comment explaining XOR for 8 byte overflow test 2022-01-03 21:23:14 -05:00
Daniel Micay
645414cc9f add 1 byte overflow tests 2022-01-03 21:20:15 -05:00
Daniel Micay
13a1f578cb use calculated size for overflow tests
This greatly reduces how much these tests depend on hard-wired knowledge
about the size classes.
2022-01-03 21:11:31 -05:00
Daniel Micay
acda766e2c fix small allocation canary overwrite test
Overwriting one byte of a canary with 0 has a 1/256 chance of not
triggering the expected failure.
2022-01-03 21:08:14 -05:00
Daniel Micay
5f32942263 get rid of canary_value when canaries are disabled 2022-01-03 20:39:30 -05:00
Daniel Micay
346529574d check whole allocation for uninit read large test 2022-01-03 17:55:05 -05:00
Daniel Micay
16c991b8f7 use 256k for large allocation tests 2022-01-03 16:11:16 -05:00
jvoisin
5f59ee3935 Add two tests to check that uninitialized read are zeroed 2022-01-03 16:10:01 -05:00
Daniel Micay
3696f071a4 use SLAB_CANARY for conditional checks 2022-01-03 02:17:04 -05:00
Daniel Micay
7d6663ed80 update copyright notice 2022-01-03 01:41:27 -05:00
Daniel Micay
c6af50d088 use unsigned for ffzl definition
This makes more sense and avoids clang tidy conversion warnings.
2022-01-03 01:29:12 -05:00
Daniel Micay
8ae78237ae avoid unnecessarily mixing 32-bit and 64-bit ints
It's ever so slightly faster to stick to stick to 64-bit arithmetic and
it avoids clang tidy being unhappy about the implicit widening.
2022-01-03 00:54:43 -05:00
Daniel Micay
3f8e9d3184 make MREMAP_MOVE_THRESHOLD into size_t constant
This avoids a clang-tidy warning and is a bit cleaner.
2022-01-03 00:32:06 -05:00
Daniel Micay
1e526fc36b disable incredibly impractical clang-tidy check
bugprone-easily-swappable-parameters is completely impractical for real
world usage. It's a reasonable thing to consider as part of API design
but it mostly applies to having APIs taking a lot of parameters. It's
unreasonable to disallow APIs simply taking 2 integer parameters even as
a loose guideline.
2022-01-03 00:27:49 -05:00
jvoisin
c5be4b1888 Fix two mundane clang warnings in the testsuite 2022-01-02 08:27:46 -05:00
jvoisin
ffdf7b1ee1 Make the testsuite work for read-after-free
This commit makes the testsuite fail if
the read-after-free tests are failing, instead
of simply printing some info.
2022-01-02 08:25:08 -05:00
jvoisin
2d56c1de01 Fix a couple of mundane typo in the readme 2022-01-02 08:20:13 -05:00
jvoisin
3878f4a5f4 Don't ignore the return value of the testsuite 2022-01-02 00:55:21 -05:00
Daniel Micay
de7a3b6e5a enable sized deallocation for sized deletion test
Clang doesn't currently enable sized deallocation by default like GCC.
2022-01-01 23:18:52 -05:00
jvoisin
9142a9376b Add a bunch of const qualifiers 2021-12-30 21:25:16 -05:00