Summary: | statically assert about invariants | ||
---|---|---|---|
Product: | dbus | Reporter: | Simon McVittie <smcv> |
Component: | core | Assignee: | Simon McVittie <smcv> |
Status: | RESOLVED FIXED | QA Contact: | John (J5) Palmieri <johnp> |
Severity: | enhancement | ||
Priority: | medium | CC: | hp |
Version: | 1.4.x | Keywords: | patch |
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | review+ | ||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 36164 | ||
Attachments: |
[PATCH 1/2] Add _DBUS_STATIC_ASSERT (based on GLib's G_STATIC_ASSERT) and use it
[PATCH 2/2] dbus-marshal-basic: assert that the size and (on gcc) alignment of all types is as expected |
Description
Simon McVittie
2011-07-28 09:52:03 UTC
Created attachment 49677 [details] [review] [PATCH 1/2] Add _DBUS_STATIC_ASSERT (based on GLib's G_STATIC_ASSERT) and use it Created attachment 49678 [details] [review] [PATCH 2/2] dbus-marshal-basic: assert that the size and (on gcc) alignment of all types is as expected The __alignof__() checks here will fail if compiling for an architecture where more-than-natural alignment is needed. --- Possibly those architectures can't exist, or can't implement ISO C; I don't really care. If they exist, the checks will make D-Bus fail to compile there (where previously it failed at runtime), and if they don't, the checks have no effect at runtime anyway. Review of attachment 49677 [details] [review]: ++ Review of attachment 49678 [details] [review]: Looks fine! Thanks, fixed in 1.4.16, 1.5.8 |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.