Harald van Dijk wrote in
<[email protected]>:
|On 07/09/2022 13:43, Steffen Nurpmeso wrote:
|> Harald van Dijk wrote in
|> <[email protected]>:
|> ...
|>|The supplied patch appears to fix both #1 and #2, but it has alignment
|>|issues: when UBSAN is enabled, I see a lot of "runtime error: store to
|>|misaligned address <...> for type 'char *', which requires 4 byte
|>|alignment" warnings when using shell arithmetic.
|>
|> ASAN works, UBSAN i have not tried. How can char* require 4 byte
|> alignment?
|
|This message means the char * object itself needs to be aligned on a 4
|byte boundary, and isn't. It doesn't say anything about what the char *
I cannot reproduce this.
But yes, i hate it, i use BITENUM_IS(POD,ENUM) because there are
not bit-flag "enumerations", so that you have to use preprocessor
macros, which in turn results in no checks for content.
I do not have a VALENUM_IS(POD,SIZE,ENUM) do get around that
i think C++ compresses enumerations to the smallest possible size.
Normally i do use only integers thus for such fields. Really.
I hate it.
Here not, for sac_error, for whatever reason, which could then
misalign anything after
struct a_shexp_arith_ctx{
- enum a_shexp_arith_error sac_error;
+ u32 sac_error;
boole sac_have_error_track;
u8 sac__pad[3];
s64 sac_rv;
But not in C.
Thank you.
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox