Harald van Dijk wrote in <16238a7b-c165-796f-a137-d5d119bf8...@gigawatt.nl>: |On 07/09/2022 13:43, Steffen Nurpmeso wrote: |> Harald van Dijk wrote in |> <92eff87d-3bfe-b1bb-03e1-5f2801844...@gigawatt.nl>: |> ... |>|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 busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox