-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Fix all instances of -Waddress-of-packed-member #40909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1d61ebc
909060d
d4fd58d
7ac6ff8
ed2ae12
7c00e9b
7989b29
364c708
5572be2
3e41e10
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -466,8 +466,11 @@ static void unref_check(struct z_object *ko, uintptr_t index) | |
| sys_bitfield_clear_bit((mem_addr_t)&ko->perms, index); | ||
|
|
||
| #ifdef CONFIG_DYNAMIC_OBJECTS | ||
| struct dyn_obj *dyn = | ||
| CONTAINER_OF(ko, struct dyn_obj, kobj); | ||
| void *vko = ko; | ||
|
|
||
| struct dyn_obj *dyn = CONTAINER_OF(vko, struct dyn_obj, kobj); | ||
| /* TODO: check why this assert hits */ | ||
| /*__ASSERT(IS_PTR_ALIGNED(dyn, struct dyn_obj), "unaligned z_object");*/ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to repeat my comment from elsewhere: this points to some suspicious behavior in the kernel dynamic object allocator. We should probably open a bug to make sure it gets looked at. Given the architecture, it's not illegal to misalign structs, but we shouldn't be doing it without a good reason. (If I had to make a wild guess, it was written for i386 and 4-byte-aligns everything, so misses half the time for structs with 64 bit pointers.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed, see here: #41062 |
||
|
|
||
| if ((ko->flags & K_OBJ_FLAG_ALLOC) == 0U) { | ||
| goto out; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.