Commit Graph

99 Commits

Author SHA1 Message Date
Gonzalo Aguilar Delgado
87ad2bcaaa THRIFT-4329: multiplexed processor, client and server for c_glib
Client: c_glib

This closes #1361
2017-11-18 21:10:18 -05:00
James E. King, III
43f4bf2fdd THRIFT-4376: fix a few high impact coverity defects:
1458947: memory leak in compiler
1458787: resource leak in c_glib led to discovery of assert() abuse
1459090: fix string.find result check in JSON processor (unlikely)

This closes #1404
2017-10-28 16:44:09 -04:00
Gonzalo Aguilar Delgado
ac61a42112 THRIFT-4212: Fix flush on invalid socket
Client: c_glib

This closes #1279
2017-09-21 09:09:20 -07:00
Gonzalo Aguilar Delgado
acbb616192 THRIFT-4211: Fix logging in c_glib
This closes #1278
2017-09-21 08:25:44 -07:00
Gonzalo Aguilar Delgado
cbd9759245 THRIFT-4205: Make sure gobject+glib are correctly linked
This closes #1272
2017-09-21 08:18:17 -07:00
Thomas Petazzoni
1744cdcb67 configure.ac, Makefile.am: introduce THRIFT variable to support cross-compilation
The thrift build system currently assumes that the thrift compiler is
always available in $(top_builddir)/compiler/cpp/thrift. However, in a
cross-compilation context, this location contains the thrift compiler
built for the target... which obviously will not run on the build
machine.

In order to support such cross-compilation situation, we introduce the
THRIFT variable as a an argument for the configure script (using
AC_ARG_VAR). If not specified, it defaults to the existing value of
using compiler/cpp/thrift from the build directory, but it can be
overridden when calling ./configure.

Note that $(top_builddir) cannot be used within the configure script,
so we simply use `pwd`, which is the same as the top_builddir.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This closes #1336
This closes #1350
2017-09-09 07:50:54 -07:00
Josip Sokcevic
722f8e9506 THRIFT-4247: Fix compilation with OpenSSL 1.1
Client: c_glib

This closes #1308
2017-09-04 18:22:03 -07:00
James E. King, III
82ae9575cd THRIFT-2221: detect C++11 and use std namespace for memory operations (smart_ptr)
Client: C++

This closes #1328
2017-08-10 13:27:21 -04:00
Jim Apple
147c2849af THRIFT-2026: Eliminate some undefined behavior in C/C++
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.
2017-03-25 08:16:18 -04:00
Gonzalo Aguilar Delgado
b79396f799 THRIFT-4108: c_glib ssl implementation fixes - remove global ssl context and more
Client: glib

This closes #1208
2017-03-06 19:09:06 -05:00
James E. King, III
37aac3bb58 THRIFT-3706: added cross test support for backwards compatible multiplexed server, added c_glib testBinary, fixed a number of glib object reference issues
Client: c_glib, java

This closes #1200
2017-02-22 12:46:04 -05:00
Gonzalo Aguilar Delgado
bc0082e023 THRIFT-3706: Implement multiplexed protocol client and test client for c_glib; test server for java; integrate into crosstest
Client: c_glib

This closes #1191
This closes #1199
2017-02-20 14:04:17 -05:00
James E. King, III
36628a28e9 THRIFT-3369 Provide SSL/TLS client for c_glib
Client: c_glib
Patch: Gonzalo Aguilar Delgado <gaguilar@level2crm.com>

This closes #1185
2017-02-13 15:25:41 -05:00
Simon South
30a8b65dce THRIFT-3968: Deserializing empty string/binary fields
Client: C (GLib)
Patch: Simon South <simonsouth@apache.org>

Deserialize empty strings as they are instead of returning NULL.
Expand test cases to clarify existing behavior when deserializing empty
binary fields.
2016-12-22 06:29:17 -05:00
Matej Kupljen
e349c345d3 THRIFT-3935 Incorrect skipping of map and set
Client: c_glib
Patch: Matej Kupljen <matej@cloudmondo.com>
2016-09-29 20:46:26 +02:00
Nobuaki Sukegawa
11da87e6f3 THRIFT-2835 Add possibility to distribute generators separately from thrift core, and load them dynamically
Client: Compiler
Patch: Nobuaki Sukegawa, rebased by dtmuller

Also fixed by dtmuller:
* Add plugin namespace for erlang language binding
* Fix unit test test_const_value
* Don't clear type cache with every t_program conversion
* Type "wb" may not be supported by popen on non-Windows platforms
* Fix constness of AST type signatures
2016-09-26 01:42:01 +09:00
Nobuaki Sukegawa
21b6d9295a THRIFT-3909 Fix c_glib static lib CMake build
This closes #1072
2016-09-04 18:49:20 +09:00
Chandler May
1fa273be50 THRIFT-2980 Accept external buffer in thrift_memory_buffer constructor
This closes #821
2016-03-13 19:15:18 +09:00
Chandler May
1ccd81bfbc THRIFT-3569 Add thrift_transport_read_all to facilitate large reads in c_glib.
Client: c_glib
Patch: Chandler May

This closes #849
2016-03-05 22:53:28 +09:00
Nobuaki Sukegawa
2303d978c0 THRIFT-3577 assertion failed at line 512 of testcontainertest.c
Client: Test (c_glib)
Patch: Nobuaki Sukegawa

This closes #882
2016-02-22 02:47:06 +09:00
Simon South
e71f20cd3e THRIFT-3556 c_glib file descriptor transport
Client: C (GLib)
Patch: Chandler May <cjmay4754@gmail.com>

This closes #810
2016-02-11 06:56:31 -05:00
Chandler May
ccd998a04e THRIFT-3572 Fix "Unable to determine the behavior of a signed right shift"
Client: Build (c_glib)
Patch: Chandler May

This closes #816
2016-01-24 01:26:33 +09:00
Nobuaki Sukegawa
607697054d THRIFT-3573 c_glib: No rule to make target issue
This closes #813 and closes #811
2016-01-23 21:50:36 +09:00
Chandler May
3fe3df2ac8 THRIFT-3567 GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Client: c_glib
Patch: Chandler May <cjmay4754@gmail.com>

This closes #806
2016-01-19 22:00:48 +01:00
Chandler May
6dde90be2e THRIFT-1313 implement compact protocol for c_glib library
Client: C_glib
Chandler May <cjmay4754@gmail.com>

This closes #795
2016-01-19 22:00:27 +01:00
Chandler May
8b0fe287a6 THRIFT-3558 fix typos in c_glib test assertions
This closes #796
2016-01-17 20:29:00 +01:00
Simon South
420ee1e7f8 THRIFT-3552 c_glib: Fix memory leak in processor
- t_c_glib_generator.cc: Free method-name string once matched within a
  generated dispatch_call implementation.
- thrift_dispatch_processor.c: Free method-name string in default
  dispatch_call implementation.
2016-01-16 12:45:19 +01:00
Simon South
bf8f7b425e THRIFT-3383 i64 related warnings
This closes #764
2016-01-03 02:55:03 +09:00
Simon South
56cf779591 THRIFT-3512 c_glib: Build fails due to missing features.h
This closes #763
2016-01-03 02:54:25 +09:00
Nobuaki Sukegawa
ba3fe86b0a THRIFT-3464 Fix several defects in c_glib code generator
Client: c_glib compiler
Patch: Nobuaki Sukegawa

This closes #724
2015-12-06 10:11:16 +09:00
Nobuaki Sukegawa
362a5eda21 THRIFT-3455 struct write method's return value is incorrect
Client: c_glib Compiler
Patch: Nobuaki Sukegawa
2015-12-04 00:38:33 +09:00
Nobuaki Sukegawa
ca93936e78 THRIFT-3424 Add CMake android build option
Client: Build
Patch: Nobuaki Sukegawa

This closes #696
2015-11-23 16:59:10 +09:00
Dave Watson
792db4e926 THRIFT-2423 Facebook's THeader protocol and transport for cpp
Client: C++ Library, Compiler
Patch: Dave Watson rebased by Nobuaki Sukegawa

This closes #357 and closes #677
2015-11-04 01:25:22 +09:00
Gonzalo Aguilar Delgado
b343feee0d THRIFT-3370 errno extern variable redefined. Not compiling for Android
Client: c_glib
Patch: Gonzalo Aguilar

This closes #638
2015-10-21 23:39:54 +09:00
Nobuaki Sukegawa
a649e7473b THRIFT-3337 Add testBool method to cross tests
This closes #611
2015-09-21 23:07:39 +02:00
Roger Meier
ff4a8edd50 THRIFT-3326 Tests do not compile under *BSD
Patch: Joao Neves
2015-09-19 20:49:50 +02:00
jfarrell
f13e431bab THRIFT-3305: Missing dist files for 0.9.3 release candidate
Client: build
Patch: jfarrell

Adds missing files to dist
2015-08-25 00:39:29 -04:00
Jens Geyer
4fed1af570 THRIFT-3178 glib C does not compile
Client: c_glib
Patch: Simon South <ssouth@simonsouth.com>

This closes #581
2015-08-08 00:24:13 +02:00
Jens Geyer
54f392b8fd THRIFT-2832 c_glib: Handle string lists correctly
Client: c_glib
Patch: Simon South <ssouth@simonsouth.com>

The compiler now correctly generates code for string lists (i.e. variables of type list<string>) that are
- Passed as a parameter to a service method,
- Returned from a service method or
- Assigned a default value.

Added a unit test that covers containers (initially only string lists) used as parameters to and return values from
service methods, and as members with default values inside structs.
2015-08-05 21:45:10 +02:00
Simon South
38e7155c03 THRIFT-3288 c_glib: Build unit tests without compiler warnings
These changes allow the unit tests for C (GLib) to build without
compiler warnings, even with additional warnings enabled. They
include

- Disabling string-function optimizations when glibc is used, as
  these produce compiler warnings when a string function is used
  within a call to assert ();

- Remove the "LL" suffix (added in C99) from 64-bit integer
  literals;

- Replace C++-style ("//") comments with C-style equivalents;

- Remove unused constant declarations that generated warnings;
  and

- Mark (or remove, from main ()) unused function parameters.
2015-08-03 22:10:23 +02:00
Simon South
db3646faef THRIFT-3288 c_glib: Unit tests: Enable warnings, improve automake-variable use
This change

- Enables the same comprehensive set of warnings ("-Wall -Wextra
  -pedantic") specified for the unit tests for C++ and

- Changes the use of automake variables (e.g. AM_CPPFLAGS) to more
  closely match their intended use, as specified in the automake
  documentation.
2015-08-03 22:10:22 +02:00
Simon South
89e65def89 THRIFT-3285 c_glib: Library: Build without compiler warnings
These changes allow the C (GLib) library to be built without
warnings from the compiler, even with extra compiler warnings
enabled. The changes involve

- Moving variable declarations to the top of every code block,

- Using unions instead of type-punning to follow strict-aliasing
  rules,

- Replacing variable-length array declarations with arrays
  allocated on the stack (using g_newa and g_alloca),

- Casting void pointers to a suitably sized data type before
  performing arithmetic on them,

- Replacing C++-style ("//") comments with C-style equivalents,
  and

- Removing an errant semicolon and comma.

This closes #576
2015-08-03 19:09:02 +02:00
Simon South
b62093db94 THRIFT-3285 c_glib: Library: Build with all warnings enabled
This matches the settings ("-Wall -Wextra -pedantic") used to build
the C++ library.
2015-08-03 19:07:42 +02:00
Simon South
31186c467a THRIFT-3285 c_glib: Library: Use AM_CPPFLAGS for include paths, not AM_CFLAGS
This follows the description of the two variables in the automake
documentation.
2015-08-03 19:07:42 +02:00
Jens Geyer
a2e0c5075d THRIFT-3260 multiple warnings in c_glib tutorial
Client: c_glib
Simon South <ssouth@simonsouth.com>

This closes #573

Here are additional changes that should really and truly resolve all the warnings generated when building the c_glib tutorial:

Compiler:
- Do not output a trailing comma in exception-enum definitions.
- Move variable declarations to avoid mixing declarations and code in generated code.
- Improve the readability of affected code blocks (and rely on indent_up and indent_down for indentation).
Library
- Use only C-style comments in headers included by clients.
Tutorial
- Move THRIFT_UNUSED_VAR calls to avoid mixing declarations and code.
2015-07-31 23:23:41 +02:00
Jens Geyer
482da722b9 THRIFT-3267 c_glib: "Critical" failure during unit tests
Client: c_glib
Patch: Simon South
2015-07-28 23:46:02 +02:00
Jens Geyer
1c1902788b THRIFT-3266 c_glib: Multiple compiler warnings building unit tests
Client: c_glib
Patch: Simon South

This closes #570
2015-07-28 23:15:18 +02:00
Jens Geyer
8c5fce9afa THRIFT-2917 "make clean" breaks test/c_glib
Client: c_glib
Patch: Simon South
2015-07-28 22:59:16 +02:00
Jens Geyer
8677719180 THRIFT-2957 warning: source file %s is in a subdirectory, but option 'subdir-objects' is disabled
Client: Compiler General
Patch: Simon South

This closes #563
2015-07-27 23:52:13 +02:00
Nobuaki Sukegawa
113b638790 THRIFT-3148 Markdown links to coding_standards are dead
This closes #491
2015-05-13 21:40:26 +02:00