Client: cpp
Sockets maybe registered to a event base of libevent, so the
following epoll_ctl(2) may fail due to EBADF, or may
delete other sockets. Chaos occurs.
This closes#1217
Client: cpp
When there are more than one IO threads, and we have failed to notify
one IO threads, then we have to close the connection. But the event_
in that connection isn't initialized. We should use setIdle() instead.
This closes#1216
Client: cpp
When failing to add tasks into the thread manager, we close the
corresponding connections, then set the flags of these connections,
which have been already freed.
We should decrease the number of active processors.
This closes#1211
Client: cocoa
TSocketServer and TSocketTransport have been refactored to support sockets created using either a port or a path.
Existing behavior for port-based socket transport is unchanged by this commit.
This closes#1031
Client: C++
There is undefined behavior in boost::lexical_cast that was fixed in
https://github.com/boostorg/lexical_cast/issues/21, but that fix is
only available in recent Boost releases. This patch removes all uses
of lexical_cast instead.
That removes the last undefined behavior, so this patch also makes
ubsan.sh unconditionally fail on undefined behavior.
This closes#1232
Clients: glib, C++
Patch: Jim Apple <jbapple-impala@apache.org>
This closes#1214
This patch fixes some undefined behavior were found using Clang's
UndefinedBehaviorSanitizer (UBSan). To check for undefined behavior,
run /build/docker/scripts/ubsan.sh. This is run during CI builds, as
well.
The examples of the types of undefined behavior fixed in this commit
are:
1. Enumerations exhibit undefined behavior when they have values
outside of a range dependent on the values of their enumerators, as
specified in C++14's chapter 7.2 ("Enumeration declarations"),
paragraph 8.
2. Left shift of negative values, used in zigzag encoding, is
undefined behavior. See 5.8 ("Shift operators"), paragraph 2 for
C++ and 6.5.7 ("Bitwise shift operators"), paragraph 4 for C99 and
C11.
Client: Go
Patch: D. Can Celasun <can@dcc.im>
This closes#1207
This commit reverts 12d430e723 which
caused invalid code to be generated for certain types.
Client: Java
Adds a Java option to the generator to generate code which lets Thrift
handle RuntimeExceptions from a service, and present them as
TApplicationException to the client.
This closes#1186
The PHP 7 extension can sometimes free strings it does not own,
when serializing string map keys, or the name of called methods.
The latter case was somewhat migitated since the double-free has no
effect on interned strings.
Using ZVAL_STR_COPY instead of ZVAL_STR will increment the reference
count, making the following destructor call correct.
Fix memory leak in PHP 7
Fix memory leak when deserializing maps or sets.
zend_hash_update will add its own reference to the key, so we need to
destruct the key zval to not leak.
We don't need to destruct the value, the hash table will take ownership
of it.
This closes#1152