bluez fails to build with latest llvm |
||||||||||
Issue descriptionSeveral errors related to default argument promotion. gobex/gobex.c:861:17: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs] An explanation at: https://www.securecoding.cert.org/confluence/display/cplusplus/EXP58-CPP.+Pass+an+object+of+the+correct+type+to+va_start
,
Nov 17 2016
,
Nov 19 2016
Manoj, I split patch set 6 into two commits by the components, and they are sent to BlueZ upstream for review. Will update the progress here. Thanks.
,
Dec 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/616f149a9f3084131a1f46f28793884d96f2d119 commit 616f149a9f3084131a1f46f28793884d96f2d119 Author: Manoj Gupta <manojgupta@google.com> Date: Tue Dec 06 00:30:38 2016 Use gcc to build net-wireless/bluez. Filter clang syntax. Bluez does not build with latest llvm because of new errors related to alignment and default argument promotion. This is a temporary workaround while we wait for the real fix to arrive from upstream. BUG= chromium:665653 TEST=bluez gets built Change-Id: Ic91d0459802664f27d536f5ed208a44fbd530888 Reviewed-on: https://chromium-review.googlesource.com/416906 Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Tested-by: Luis Lozano <llozano@chromium.org> Reviewed-by: Luis Lozano <llozano@chromium.org> [add] https://crrev.com/616f149a9f3084131a1f46f28793884d96f2d119/chromeos/config/env/net-wireless/bluez
,
Dec 9 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/bluez/+/749cb98842b831d002f9889f2b1666ecc5ccf0be commit 749cb98842b831d002f9889f2b1666ecc5ccf0be Author: Miao-chen Chou <mcchou@chromium.org> Date: Sat Dec 03 02:06:12 2016 UPSTREAM: gobex: Fix a compilation error for the compatibility with LLVM The C Standard, subclause 7.16.1.4, paragraph 4 [ISO/IEC 9899:2011], states: The parameter parmN is the identifier of the rightmost parameter in the variable parameter list in the function definition (the one just before the ...). If the parameter parmN is declared with the register storage class, with a function or array type, or with a type that is not compatible with the type that results after application of the default argument promotions, the behavior is undefined. BUG= chromium:665653 TEST=emerge bluez with LLVM enforced Change-Id: I8da7179a9ba3daceb0ab9a68bb882ee48ba113d9 Reviewed-on: https://chromium-review.googlesource.com/417985 Commit-Ready: Miao-chen Chou <mcchou@chromium.org> Tested-by: Miao-chen Chou <mcchou@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Miao-chen Chou <mcchou@chromium.org> [modify] https://crrev.com/749cb98842b831d002f9889f2b1666ecc5ccf0be/gobex/gobex-packet.h [modify] https://crrev.com/749cb98842b831d002f9889f2b1666ecc5ccf0be/gobex/gobex-transfer.c [modify] https://crrev.com/749cb98842b831d002f9889f2b1666ecc5ccf0be/gobex/gobex.h [modify] https://crrev.com/749cb98842b831d002f9889f2b1666ecc5ccf0be/gobex/gobex-packet.c [modify] https://crrev.com/749cb98842b831d002f9889f2b1666ecc5ccf0be/gobex/gobex.c
,
Dec 9 2016
,
Dec 9 2016
The third patch has been upload for upstream review. See http://www.spinics.net/lists/linux-bluetooth/msg69074.html for the patch. The local copy also reflect the latest patch set (see crosreview.com/414227).
,
Dec 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/bluez/+/cc7f843f4599ea337e4ea3aa96aaa3e706e85bd3 commit cc7f843f4599ea337e4ea3aa96aaa3e706e85bd3 Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Date: Fri Dec 09 10:21:45 2016 UPSTREAM: monitor/rfcomm: Remove packed attribute from structs These structs do not represent the raw PDU format thus they don't need to be the exact same size. BUG= chromium:665653 TEST=emerge bluez with LLVM enforced Change-Id: I464fe6890baa8f8db240038f473bc6408d9f3830 Reviewed-on: https://chromium-review.googlesource.com/421099 Commit-Ready: Miao-chen Chou <mcchou@chromium.org> Tested-by: Miao-chen Chou <mcchou@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Miao-chen Chou <mcchou@chromium.org> [modify] https://crrev.com/cc7f843f4599ea337e4ea3aa96aaa3e706e85bd3/monitor/rfcomm.c
,
Dec 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/bluez/+/74a9159a7972153cee83524f07e6bfd8745396c5 commit 74a9159a7972153cee83524f07e6bfd8745396c5 Author: Miao-chen Chou <mcchou@chromium.org> Date: Thu Nov 24 01:16:13 2016 FROMLIST: monitor/rfcomm: Fix a potential memory access issue for compatibility with LLVM This patch removes "packed" attribute from the definition of struct rfcomm_rpn to prevent the access to an unaligned struct member in mmc_rpn(). This patch also introduces a temp variable in mcc_pn() to prevent unaligned access without touching the definition of struct rfcomm_pn, since struct rfcomm_pn is used as a PDU. (cherry picked from http://www.spinics.net/lists/linux-bluetooth/msg69149.html) BUG= chromium:665653 TEST=emerge bluez with LLVM enforced Change-Id: I934580c05fdf63311d7ccabee5bf5c8232c441b8 Reviewed-on: https://chromium-review.googlesource.com/414227 Commit-Ready: Miao-chen Chou <mcchou@chromium.org> Tested-by: Miao-chen Chou <mcchou@chromium.org> Reviewed-by: Puthikorn Voravootivat <puthik@chromium.org> Reviewed-by: Miao-chen Chou <mcchou@chromium.org> [modify] https://crrev.com/74a9159a7972153cee83524f07e6bfd8745396c5/monitor/rfcomm.c
,
Dec 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/2942fae0a346ab88e6a7a1a14b5c7b0503781ef3 commit 2942fae0a346ab88e6a7a1a14b5c7b0503781ef3 Author: Miao-chen Chou <mcchou@chromium.org> Date: Sat Dec 17 00:32:01 2016 Revert "Use gcc to build net-wireless/bluez. Filter clang syntax." This reverts commit 616f149a9f3084131a1f46f28793884d96f2d119. crosreview.com/414227 has landed to resolve the error messages during the compilation of BlueZ. BUG= chromium:665653 TEST=emerge bluez with LLVM enforced Change-Id: I923428e1bf0dd6f04fe40134994f2a12e4708e0a Reviewed-on: https://chromium-review.googlesource.com/422582 Commit-Ready: Miao-chen Chou <mcchou@chromium.org> Tested-by: Miao-chen Chou <mcchou@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Miao-chen Chou <mcchou@chromium.org> [delete] https://crrev.com/b389b214b59048e742cc89b19685d1a0b7edf4fe/chromeos/config/env/net-wireless/bluez
,
Dec 22 2016
Once these patches, https://chromium-review.googlesource.com/q/project:chromiumos%252Fthird_party%252Fbluez+topic:llvm-migration, land, this can be marked as fixed.
,
Dec 23 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/bluez/+/31b49f130ba580a5e3e54f45ea439b7c4d8953ab commit 31b49f130ba580a5e3e54f45ea439b7c4d8953ab Author: Miao-chen Chou <mcchou@chromium.org> Date: Thu Dec 22 19:04:56 2016 Revert "FROMLIST: monitor/rfcomm: Fix a potential memory access issue for compatibility with LLVM" This reverts commit 74a9159a7972153cee83524f07e6bfd8745396c5. This will be replaced by the patches from BlueZ upstream. BUG= chromium:665653 TEST=None Change-Id: I090df47ec107f8ca4e1515e35de25b3892822f85 Reviewed-on: https://chromium-review.googlesource.com/423347 Commit-Ready: Miao-chen Chou <mcchou@chromium.org> Tested-by: Miao-chen Chou <mcchou@chromium.org> Reviewed-by: Puthikorn Voravootivat <puthik@chromium.org> Reviewed-by: Miao-chen Chou <mcchou@chromium.org> [modify] https://crrev.com/31b49f130ba580a5e3e54f45ea439b7c4d8953ab/monitor/rfcomm.c
,
Dec 23 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/bluez/+/1c1767effcbcb57171bee5b53ff5f1ff5b2a37cc commit 1c1767effcbcb57171bee5b53ff5f1ff5b2a37cc Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Date: Tue Dec 20 09:52:00 2016 UPSTREAM: monitor/rfcomm: Fix left over packed struct BUG= chromium:665653 TEST=None Change-Id: Iacc73564b20566e34cd7b72cface5f7ec39a1256 Reviewed-on: https://chromium-review.googlesource.com/423348 Commit-Ready: Miao-chen Chou <mcchou@chromium.org> Tested-by: Miao-chen Chou <mcchou@chromium.org> Reviewed-by: Puthikorn Voravootivat <puthik@chromium.org> Reviewed-by: Miao-chen Chou <mcchou@chromium.org> [modify] https://crrev.com/1c1767effcbcb57171bee5b53ff5f1ff5b2a37cc/monitor/rfcomm.c
,
Dec 23 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/bluez/+/4853c8e4cabf6c22cd0086298d23053f4725aa46 commit 4853c8e4cabf6c22cd0086298d23053f4725aa46 Author: Miao-chen Chou <mcchou@chromium.org> Date: Thu Dec 22 00:12:33 2016 UPSTREAM: monitor/rfcomm: Fix a potential memory access issue for compatibility with LLVM This patch removes "packed" attribute from the definition of struct rfcomm_rpn to prevent the access to an unaligned struct member in mmc_rpn(). This patch also introduces a temp variable in mcc_pn() to prevent unaligned access without touching the definition of struct rfcomm_pn, since struct rfcomm_pn is used as a PDU. error messages from LLVM build: monitor/rfcomm.c:238:36: error: taking address of packed member 'pm' of class or structure 'rfcomm_rpn' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member] if (!l2cap_frame_get_le16(frame, &rpn.pm)) monitor/rfcomm.c:287:36: error: taking address of packed member 'mtu' of class or structure 'rfcomm_pn' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member] if (!l2cap_frame_get_le16(frame, &pn.mtu)) Currently there is no corresponding flag in GCC to generate the same error messages. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51628. BUG= chromium:665653 TEST=emerge bluez with LLVM enforced Change-Id: I3a4dc7e93f8f8b3b549a5db8e3ce7536c121d705 Reviewed-on: https://chromium-review.googlesource.com/423349 Commit-Ready: Miao-chen Chou <mcchou@chromium.org> Tested-by: Miao-chen Chou <mcchou@chromium.org> Reviewed-by: Puthikorn Voravootivat <puthik@chromium.org> Reviewed-by: Miao-chen Chou <mcchou@chromium.org> [modify] https://crrev.com/4853c8e4cabf6c22cd0086298d23053f4725aa46/monitor/rfcomm.c
,
Dec 27 2016
,
Mar 4 2017
,
Apr 17 2017
,
May 30 2017
,
Aug 1 2017
,
Aug 3 2017
Closing. Please reopen it if its not fixed. Thanks! |
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by manojgupta@chromium.org
, Nov 16 2016