I believe you are getting a 4 byte write (default int, 32bits on all modern platforms) for each 1 byte bool object.
Input
mut blob = raw[true, false]
Output from GCC (with no compiler warnings enabled)
build/debug/main.c: In function ‘create_buffer_11’:
build/debug/main.c:402:17: warning: ‘_Bool’ is promoted to ‘int’ when passed through ‘...’
402 | *(output + i) = va_arg(args, bool);
| ^~~~~~
build/debug/main.c:402:17: note: (so you should pass ‘int’ not ‘_Bool’ to ‘va_arg’)
build/debug/main.c:402:17: note: if this code is reached, the program will abort
I believe you are getting a 4 byte write (default
int
, 32bits on all modern platforms) for each 1 bytebool
object.Input
Output from GCC (with no compiler warnings enabled)
Output from clang: