New issue
Advanced search Search tips

Issue 609383 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: ----
Type: ----



Sign in to add a comment

undefined behavior of va_start in bluez

Project Member Reported by laszio@chromium.org, May 5 2016

Issue description

In gobex-transfer.c:306 [1]:

va_start(args, first_hdr_id);

where first_hdr_id is a guint8 and will be promoted. According to C99 and C++11, the behavior is undefined. Recent clang gives a warning of this:

warning: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Wvarargs]

which is in turn an error with -Werror given.

[1] https://cs.corp.google.com/chromeos_public/src/third_party/bluez/gobex/gobex-transfer.c?l=306
 
This has to be fixed in upstream. However, it may take a while until next release. Let's workaround by -Wno-varargs for now and leave this bug open for tracking.
For now, it is probably better to have a local patch (using epatch in the ebuild file) to fix this and report the bug and fix upstream.
Components: IO>Bluetooth

Comment 4 by cco3@chromium.org, Jan 3 2018

Status: Fixed (was: Untriaged)
This seems to have fixed the issue:
https://chromium.git.corp.google.com/chromiumos/third_party/bluez/+/4832ed033973018a8f87f156fb8f33c8f80a5904

Sign in to add a comment