diff options
author | Simon McVittie <smcv@debian.org> | 2016-03-02 18:52:34 +0000 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2016-03-02 18:52:34 +0000 |
commit | 735cf7b844fffa245198cef1aab24c9063b94940 (patch) | |
tree | 69a79688af0e6dc05d3ccebdc432974da9e7ba34 | |
parent | d29534c0758fb048ce43e3c100733e0b0dd9f242 (diff) | |
parent | 42ccc7dc39cf2e5563da971b65866f492ff4ddae (diff) |
Merge branch 'dbus-1.10' into dbus-1.10-ci
-rw-r--r-- | NEWS | 23 | ||||
-rw-r--r-- | dbus/dbus-internals.h | 3 | ||||
-rw-r--r-- | dbus/dbus-message.c | 37 | ||||
-rw-r--r-- | dbus/dbus-message.h | 2 | ||||
-rw-r--r-- | doc/dbus-test-tool.1.xml.in | 4 | ||||
-rw-r--r-- | tools/dbus-echo.c | 2 |
6 files changed, 66 insertions, 5 deletions
@@ -1,7 +1,28 @@ D-Bus 1.10.8 (UNRELEASED) == -... +Fixes: + +• Enable "large file support" on systems where it exists: dbus-daemon + is not expected to open large files, but it might need to stat files + that happen to have large inode numbers (fd.o #93545, Hongxu Jia) + +• Eliminate padding inside DBusMessageIter on 64-bit platforms, + which might result in a pedantic C compiler not copying the entire contents + of a DBusMessageIter; statically assert that this is not an ABI change + in practice (fd.o #94136, Simon McVittie) + +• Document dbus-test-tool echo --sleep-ms=N instead of incorrect --sleep=N + (fd.o #94244, Dmitri Iouchtchenko) + +• Correctly report test failures in C tests from run-test.sh + (fd.o #93379; amit tewari, Simon McVittie) + +• When tests are enabled, run all the marshal-validate tests, not just + the even-numbered ones (fd.o #93908, Nick Lewycky) + +• Correct the expected error from one marshal-validate test, which was + previously not run due to the above bug (fd.o #93908, Simon McVittie) D-Bus 1.10.6 (2015-12-01) == diff --git a/dbus/dbus-internals.h b/dbus/dbus-internals.h index 3eb8749f..df8e9643 100644 --- a/dbus/dbus-internals.h +++ b/dbus/dbus-internals.h @@ -195,6 +195,9 @@ extern const char *_dbus_return_if_fail_warning_format; #define _DBUS_STRUCT_OFFSET(struct_type, member) \ ((intptr_t) ((unsigned char*) &((struct_type*) 0)->member)) +#define _DBUS_ALIGNOF(type) \ + (_DBUS_STRUCT_OFFSET (struct { char _1; type _2; }, _2)) + #ifdef DBUS_DISABLE_CHECKS /* this is an assert and not an error, but in the typical --disable-checks case (you're trying * to really minimize code size), disabling these assertions makes sense. diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c index 699e022b..e22fe51b 100644 --- a/dbus/dbus-message.c +++ b/dbus/dbus-message.c @@ -136,6 +136,29 @@ struct DBusMessageRealIter } u; /**< the type writer or reader that does all the work */ }; +/** + * Layout of a DBusMessageIter on the stack in dbus 1.10.0. This is no + * longer used, but for ABI compatibility we need to assert that the + * new layout is the same size. + */ +typedef struct +{ + void *dummy1; + void *dummy2; + dbus_uint32_t dummy3; + int dummy4; + int dummy5; + int dummy6; + int dummy7; + int dummy8; + int dummy9; + int dummy10; + int dummy11; + int pad1; + int pad2; + void *pad3; +} DBusMessageIter_1_10_0; + static void get_const_signature (DBusHeader *header, const DBusString **type_str_p, @@ -2025,7 +2048,21 @@ _dbus_message_iter_init_common (DBusMessage *message, DBusMessageRealIter *real, int iter_type) { + /* If these static assertions fail on your platform, report it as a bug. */ _DBUS_STATIC_ASSERT (sizeof (DBusMessageRealIter) <= sizeof (DBusMessageIter)); + _DBUS_STATIC_ASSERT (_DBUS_ALIGNOF (DBusMessageRealIter) <= + _DBUS_ALIGNOF (DBusMessageIter)); + /* A failure of these two assertions would indicate that we've broken + * ABI on this platform since 1.10.0. */ + _DBUS_STATIC_ASSERT (sizeof (DBusMessageIter_1_10_0) == + sizeof (DBusMessageIter)); + _DBUS_STATIC_ASSERT (_DBUS_ALIGNOF (DBusMessageIter_1_10_0) == + _DBUS_ALIGNOF (DBusMessageIter)); + /* If this static assertion fails, it means the DBusMessageIter struct + * is not "packed", which might result in "iter = other_iter" not copying + * every byte. */ + _DBUS_STATIC_ASSERT (sizeof (DBusMessageIter) == + 4 * sizeof (void *) + sizeof (dbus_uint32_t) + 9 * sizeof (int)); /* Since the iterator will read or write who-knows-what from the * message, we need to get in the right byte order diff --git a/dbus/dbus-message.h b/dbus/dbus-message.h index 3e33eb7b..ac3e4087 100644 --- a/dbus/dbus-message.h +++ b/dbus/dbus-message.h @@ -62,7 +62,7 @@ struct DBusMessageIter int dummy10; /**< Don't use this */ int dummy11; /**< Don't use this */ int pad1; /**< Don't use this */ - int pad2; /**< Don't use this */ + void *pad2; /**< Don't use this */ void *pad3; /**< Don't use this */ }; diff --git a/doc/dbus-test-tool.1.xml.in b/doc/dbus-test-tool.1.xml.in index 091dee14..5b7c43ed 100644 --- a/doc/dbus-test-tool.1.xml.in +++ b/doc/dbus-test-tool.1.xml.in @@ -45,7 +45,7 @@ <arg choice="plain">--system</arg> </group> <arg choice="opt">--name=<replaceable>NAME</replaceable></arg> - <arg choice="opt">--sleep=<replaceable>MS</replaceable></arg> + <arg choice="opt">--sleep-ms=<replaceable>MS</replaceable></arg> </cmdsynopsis> <cmdsynopsis> @@ -161,7 +161,7 @@ </varlistentry> <varlistentry> - <term><option>--sleep=</option><replaceable>MS</replaceable></term> + <term><option>--sleep-ms=</option><replaceable>MS</replaceable></term> <listitem> <para>Block for <replaceable>MS</replaceable> milliseconds before replying to a method call.</para> diff --git a/tools/dbus-echo.c b/tools/dbus-echo.c index 0e7de1bd..738b1cb3 100644 --- a/tools/dbus-echo.c +++ b/tools/dbus-echo.c @@ -52,7 +52,7 @@ usage_echo (int exit_with) "\n" " --name=NAME claim this well-known name first\n" "\n" - " --sleep=N sleep N milliseconds before sending each reply\n" + " --sleep-ms=N sleep N milliseconds before sending each reply\n" "\n" " --session use the session bus (default)\n" " --system use the system bus\n" |