You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VoltageSensorUpdate does not contain any u_rated. The wrong pointer is matched with the wrong type, and as a result, the entire memory layout is wrong.
In addition, it is probably a good idea to add a static_assert<std::is_standard_layout_v<T>> for every input, update and output struct
Other notes
FYI: @nitbharambe found multiple bugs for the Clang CL presets (SEGFAULTs, type mismatch, ...). The compiler compiles the code, but the tests fail.
After investigating:
I am able to repro on main, which means that it's not a problem on my branch
we do need to disable the Clang CL presets for the time being.
Apparently, I did not find the issue before because I just so happened to not run the tests for these specific presets (I did do a matrix test with (gcc, clang, msvc) x (release, debug), but apparently not for clang-cl)
The text was updated successfully, but these errors were encountered:
mgovers
changed the title
FYI: @nitbharambe found multiple bugs for the Clang CL presets (SEGFAULTs, type mismatch, ...). The compiler compiles the code, but the tests fail.
tests fail for Clang CL
Apr 17, 2023
Repro
Initial investigation
Likely related to this chunk of code not working:
In
get_data_attribute
, I logged the related types for every field:and I saw that the types do not match at all with the fields, e.g.:
VoltageSensorUpdate
does not contain anyu_rated
. The wrong pointer is matched with the wrong type, and as a result, the entire memory layout is wrong.In addition, it is probably a good idea to add a
static_assert<std::is_standard_layout_v<T>>
for every input, update and output structOther notes
FYI: @nitbharambe found multiple bugs for the Clang CL presets (SEGFAULTs, type mismatch, ...). The compiler compiles the code, but the tests fail.
After investigating:
main
, which means that it's not a problem on my branchApparently, I did not find the issue before because I just so happened to not run the tests for these specific presets (I did do a matrix test with
(gcc, clang, msvc) x (release, debug)
, but apparently not forclang-cl
)c.c. @TonyXiang8787 @petersalemink95
Originally posted by @mgovers in #239 (comment)
The text was updated successfully, but these errors were encountered: