]> granicus.if.org Git - re2c/commitdiff
Increase allocator alignment to pointer size to avoid unaligned reads/writes.
authorUlya Trofimovich <skvadrik@gmail.com>
Tue, 14 Aug 2018 06:10:26 +0000 (07:10 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Tue, 14 Aug 2018 06:10:26 +0000 (07:10 +0100)
Unaligned operations found by ubsan.

re2c/src/dfa/determinization.h

index 942be272d8064c4ecd6f5a5a838066e9bcd5a784..d8c025563b787db5e53935ee407b11c08eb0e6f1 100644 (file)
@@ -27,7 +27,7 @@ struct dfa_t;
 struct tcmd_t;
 
 
-typedef slab_allocator_t<> allocator_t;
+typedef slab_allocator_t<4 * 1024, 1024 * 1024, sizeof(void*)> allocator_t;
 
 
 struct clos_t