]>
git.ipfire.org Git - thirdparty/json-c.git/log
Eric Hawicz [Wed, 28 Jun 2023 22:01:39 +0000 (18:01 -0400)]
Merge pull request #624 from besser82/topic/besser82/json-c-0.14/rdrand_fixes
json-c-0.14: Detect broken RDRAND during initialization.
Björn Esser [Mon, 25 May 2020 11:03:31 +0000 (13:03 +0200)]
Detect broken RDRAND during initialization.
Some CPUs advertise RDRAND in CPUID, but return
0xFFFFFFFF unconditionally. To avoid locking up
later, test RDRAND during initialization, and if
it returns 0xFFFFFFFF, mark it as nonexistent.
Also fix a possible segmentation fault in CPUID check.
This commit is a squashed backport of the following
commits on the master branch:
*
0e5bbcaa162ac7850eb4fcd8f91391837d0efb50
*
4d36b0287d3ab0912ba8a4790340ca099960b2b0
*
80863140263be5f2dc630938ed8f0066f8a1ab43
Eric Hawicz [Sat, 16 May 2020 01:02:37 +0000 (21:02 -0400)]
Merge pull request #608 from besser82/topic/besser82/json-c-0.14/CVE-2020-12762
json-c-0.14: Fix CVE-2020-12762 - json-c through 0.14 has an integer overflow and out-of-bounds write ...
Björn Esser [Thu, 14 May 2020 10:32:30 +0000 (12:32 +0200)]
Eric Haszlakiewicz [Tue, 21 Apr 2020 01:13:21 +0000 (01:13 +0000)]
Issue #585: don't install config.h
(cherry picked from commit
8b511c402b73d1d8b195991891c8d44859cb57ec )
Eric Haszlakiewicz [Sun, 19 Apr 2020 03:40:50 +0000 (03:40 +0000)]
Generate docs for the 0.14 release.
Eric Haszlakiewicz [Sun, 19 Apr 2020 03:40:37 +0000 (03:40 +0000)]
Bump version to 0.14 and shared library version to 5.0.0
Eric Haszlakiewicz [Sun, 19 Apr 2020 01:31:48 +0000 (01:31 +0000)]
Fill in the ChangeLog for the upcoming 0.14 release.
Eric Haszlakiewicz [Sun, 19 Apr 2020 01:28:24 +0000 (01:28 +0000)]
Fill in a few more pre-release steps to match what we've done for the 0.14 release.
Move the list of contributors to the AUTHORS file.
Eric Haszlakiewicz [Sat, 18 Apr 2020 03:22:52 +0000 (03:22 +0000)]
Rewrite the issued_closed_for_* files so they display a bit nicer.
Eric Haszlakiewicz [Sat, 18 Apr 2020 02:42:46 +0000 (02:42 +0000)]
Explicitly mark several things in json_tokener deprecated.
Eric Haszlakiewicz [Sat, 18 Apr 2020 02:14:13 +0000 (02:14 +0000)]
Re-do clang-format.
Eric Haszlakiewicz [Sat, 18 Apr 2020 02:05:37 +0000 (02:05 +0000)]
Make json_abort() internal to json_object.c
Eric Haszlakiewicz [Sat, 18 Apr 2020 02:02:06 +0000 (02:02 +0000)]
Make json_tokener_validate_utf8() internal to json_tokener.c, and improve the docs a bit.
Eric Haszlakiewicz [Fri, 17 Apr 2020 17:32:17 +0000 (13:32 -0400)]
Merge pull request #582 from dota17/list_closed_issue_pr
add the list of issues& prs closed
dota17 [Fri, 17 Apr 2020 01:40:24 +0000 (09:40 +0800)]
update
dota17 [Thu, 16 Apr 2020 08:30:14 +0000 (16:30 +0800)]
manual adjustment
dota17 [Thu, 16 Apr 2020 08:15:04 +0000 (16:15 +0800)]
add the list of issues& prs closed
Eric Haszlakiewicz [Thu, 16 Apr 2020 03:35:21 +0000 (23:35 -0400)]
Merge pull request #524 from dota17/addTestCase_obj_token
Increase coverage
Eric Haszlakiewicz [Thu, 16 Apr 2020 03:32:59 +0000 (23:32 -0400)]
Merge pull request #581 from Jehan/wip/Jehan/no-strict-prototypes-windows
CMakeLists: do not enforce strict prototypes on Windows.
dota17 [Wed, 15 Apr 2020 12:06:12 +0000 (20:06 +0800)]
remove unsuitable case
Jehan [Wed, 15 Apr 2020 11:01:09 +0000 (13:01 +0200)]
CMakeLists: do not enforce strict prototypes on Windows.
On Windows, or at least when cross-built with Mingw-w64, build fails
because strict prototype fails on an included file (thus nothing we can
do about in json-c code):
> from /home/jehan/dev/src/json-c/json_util.c:44:
> /home/jehan/.local/share/crossroad/roads/w64/json-c/include/minwindef.h:196:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
> 196 | typedef INT_PTR (WINAPI *FARPROC) ();
> | ^~~~~~~
> /home/jehan/.local/share/crossroad/roads/w64/json-c/include/minwindef.h:197:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
> 197 | typedef INT_PTR (WINAPI *NEARPROC) ();
> | ^~~~~~~
> /home/jehan/.local/share/crossroad/roads/w64/json-c/include/minwindef.h:198:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
> 198 | typedef INT_PTR (WINAPI *PROC) ();
> | ^~~~~~~
Let's just disable the errors for Windows build.
Eric Haszlakiewicz [Tue, 14 Apr 2020 19:17:21 +0000 (15:17 -0400)]
Merge pull request #580 from besser82/topic/besser82/fix_cmake_tests
Fix CMake tests for enforced strict prototypes.
Björn Esser [Tue, 14 Apr 2020 18:42:32 +0000 (20:42 +0200)]
Fix CMake tests for enforced strict prototypes.
Eric Haszlakiewicz [Tue, 14 Apr 2020 14:28:16 +0000 (10:28 -0400)]
Merge pull request #527 from dota17/arraylist_test
Arraylist testcase
Eric Haszlakiewicz [Tue, 14 Apr 2020 14:25:13 +0000 (10:25 -0400)]
Merge pull request #579 from besser82/topic/besser82/strict-prototypes
Enforce strict prototypes.
dota17 [Tue, 14 Apr 2020 02:15:27 +0000 (10:15 +0800)]
clang-format two test_util_file.c and test_object_iterator.c
chenguoping [Fri, 3 Jan 2020 02:17:05 +0000 (10:17 +0800)]
Increased the test coverage of json_util.c from 76% to 90.3%.
chenguoping [Fri, 3 Jan 2020 02:05:09 +0000 (10:05 +0800)]
Increased the test coverage of json_object_iterator.c from 0% to 100%
dota17 [Tue, 14 Apr 2020 01:20:51 +0000 (09:20 +0800)]
clang-format test1.c
chenguoping [Fri, 3 Jan 2020 08:56:43 +0000 (16:56 +0800)]
fix valgrind errors
chenguoping [Thu, 2 Jan 2020 11:30:00 +0000 (19:30 +0800)]
testcase for array_list
Björn Esser [Mon, 13 Apr 2020 09:29:52 +0000 (11:29 +0200)]
Enforce strict prototypes.
Eric Haszlakiewicz [Mon, 13 Apr 2020 00:52:01 +0000 (20:52 -0400)]
Merge pull request #578 from besser82/topic/besser82/pkgconfig_install
CMake: Install pkgconfig file in proper location by default
Björn Esser [Sun, 12 Apr 2020 17:21:54 +0000 (19:21 +0200)]
CMake: Install pkgconfig file in proper location by default
The default location for pkconfig files on most systems is:
${CMAKE_INSTALL_LIBDIR}/pkgconfig
Thus the file should get installed in there by default.
Eric Haszlakiewicz [Sun, 12 Apr 2020 02:35:40 +0000 (22:35 -0400)]
Merge pull request #577 from besser82/topic/besser82/json_c_version_test_verbose_on_fail
Be verbose on failing json_c_version test.
Björn Esser [Sat, 11 Apr 2020 19:09:31 +0000 (21:09 +0200)]
Be verbose on failing json_c_version test.
Eric Haszlakiewicz [Sat, 11 Apr 2020 18:45:45 +0000 (14:45 -0400)]
Merge pull request #576 from besser82/topic/besser82/increase_coverage
Test coverage for json_c_version.
Eric Haszlakiewicz [Sat, 11 Apr 2020 18:18:37 +0000 (14:18 -0400)]
Merge pull request #575 from besser82/topic/besser82/cosmetics
Small cosmetics.
Björn Esser [Sat, 11 Apr 2020 10:29:36 +0000 (12:29 +0200)]
Test coverage for json_c_version.
Björn Esser [Sat, 11 Apr 2020 08:34:30 +0000 (10:34 +0200)]
Remove multiple trailing newlines at EOF.
Björn Esser [Fri, 10 Apr 2020 11:10:30 +0000 (13:10 +0200)]
gitignore: Add build folder.
Björn Esser [Fri, 10 Apr 2020 11:06:54 +0000 (13:06 +0200)]
Clean trailing white-space.
Björn Esser [Fri, 10 Apr 2020 11:25:41 +0000 (13:25 +0200)]
Fix line terminators to be UNIX.
Eric Haszlakiewicz [Sat, 11 Apr 2020 03:24:51 +0000 (03:24 +0000)]
Update README.md to remove autoconf instructions in favor of cmake.
Eric Haszlakiewicz [Sat, 11 Apr 2020 02:08:27 +0000 (22:08 -0400)]
Merge pull request #572 from besser82/topic/besser82/cmake_fixes
Small fixes to CMakeLists
Chen [Sat, 11 Apr 2020 01:31:43 +0000 (09:31 +0800)]
Merge pull request #573 from besser82/topic/besser82/coverage
Fix coveralls submission.
Björn Esser [Fri, 10 Apr 2020 13:08:09 +0000 (15:08 +0200)]
Fix coveralls submission.
coveralls-cpp is dead and does not work anymore.
Fortunately there is coveralls-lcov available.
Björn Esser [Fri, 10 Apr 2020 12:42:03 +0000 (14:42 +0200)]
CMake: Check whether BSYMBOLIC is supported by the linker.
Linking with '-Bsymbolic-functions' is supported for ELF-binaries, only.
Björn Esser [Fri, 10 Apr 2020 12:20:57 +0000 (14:20 +0200)]
CMake: Build Doxygen documentation out-of-tree.
Björn Esser [Fri, 10 Apr 2020 12:15:52 +0000 (14:15 +0200)]
CMake: Fix appending of linker flags.
There was a typo in `CMAKE_SHARED_LINKER_FLAGS`.
Eric Haszlakiewicz [Fri, 10 Apr 2020 02:11:48 +0000 (02:11 +0000)]
List the set of contributors since the 0.13 branch
Eric Haszlakiewicz [Fri, 10 Apr 2020 01:26:04 +0000 (01:26 +0000)]
Fix one more assert("!invalid cint_type") to use json_abort(...) instead.
Eric Haszlakiewicz [Thu, 9 Apr 2020 20:58:28 +0000 (20:58 +0000)]
Issue #568: fix the strtoll and strtoull handing so config.h ends up creating defines for those only when needed, which should exclude mingw environments.
Eric Haszlakiewicz [Thu, 9 Apr 2020 02:55:21 +0000 (02:55 +0000)]
Remove autoconf files from .gitignore.
Eric Haszlakiewicz [Thu, 9 Apr 2020 02:34:59 +0000 (02:34 +0000)]
Update the oss-fuzz build script to try to get it to work with cmake.
Eric Haszlakiewicz [Thu, 9 Apr 2020 02:15:31 +0000 (02:15 +0000)]
Remove autoconf machinery, we're using cmake now. Update the release checklist to account for that, plus fill in other tasks and clean it up a bit.
Eric Haszlakiewicz [Wed, 8 Apr 2020 03:04:27 +0000 (03:04 +0000)]
osx builds also need -DDISABLE_BSYMBOLIC=ON
Eric Haszlakiewicz [Wed, 8 Apr 2020 02:54:10 +0000 (02:54 +0000)]
I have NFC why osx fails when "set -e" is in effect, but leave it off and clean up the rest of the debuging code in the travis config.
Eric Haszlakiewicz [Wed, 8 Apr 2020 02:53:48 +0000 (02:53 +0000)]
Not all systems (e.g. osx) have malloc.h, include stdlib.h instead.
Eric Haszlakiewicz [Wed, 8 Apr 2020 02:39:03 +0000 (02:39 +0000)]
Try yet again to fix the osx build, this time do set +e
Eric Haszlakiewicz [Wed, 8 Apr 2020 02:28:02 +0000 (02:28 +0000)]
Another attempt at debugging the travis osx build, this time just ignore errors.
Eric Haszlakiewicz [Wed, 8 Apr 2020 02:17:14 +0000 (02:17 +0000)]
Wait a while before exiting travis to allow output to flush.
Eric Haszlakiewicz [Wed, 8 Apr 2020 02:02:25 +0000 (02:02 +0000)]
Apparently cmake is already installed on travis osx builds. Try another approach to figure out what was failing.
Eric Haszlakiewicz [Wed, 8 Apr 2020 01:45:49 +0000 (01:45 +0000)]
Install cmake on osx travis builds. s/make check/make test/
Eric Haszlakiewicz [Wed, 8 Apr 2020 01:34:22 +0000 (01:34 +0000)]
Perform the travis build in a subdir, so the distcheck target works.
Eric Haszlakiewicz [Wed, 8 Apr 2020 01:21:11 +0000 (01:21 +0000)]
Switch travis to use cmake instead of autoconf.
Eric Haszlakiewicz [Mon, 6 Apr 2020 13:55:27 +0000 (13:55 +0000)]
Add includes and split off json_types.h to help ensure that headers can be included in any order.
Eric Haszlakiewicz [Mon, 6 Apr 2020 02:47:34 +0000 (02:47 +0000)]
Don't let clang-format rearrange Windows includes, since they need to be in a particular order.
Eric Haszlakiewicz [Mon, 6 Apr 2020 01:52:28 +0000 (01:52 +0000)]
Format random_seed.c with clang-format, with key asm sections excluded.
Eric Haszlakiewicz [Mon, 6 Apr 2020 01:49:14 +0000 (01:49 +0000)]
Update the style guide to mention that we're using clang-format now.
Eric Haszlakiewicz [Fri, 3 Apr 2020 04:13:34 +0000 (00:13 -0400)]
Merge pull request #555 from dota17/chang_format_3
Format json-c with clang-format tool
dota17 [Sat, 28 Mar 2020 02:25:00 +0000 (10:25 +0800)]
clang-format the files
dota17 [Fri, 27 Mar 2020 05:04:50 +0000 (13:04 +0800)]
add the disabling formatting coments and adjust the partial code manuly
dota17 [Tue, 10 Mar 2020 07:47:53 +0000 (15:47 +0800)]
add options
dota17 [Fri, 6 Mar 2020 09:15:05 +0000 (17:15 +0800)]
clang-format
Eric Haszlakiewicz [Fri, 3 Apr 2020 02:35:21 +0000 (22:35 -0400)]
Merge pull request #563 from robybeen/master
Changed order of calloc args to match stdlib
Robert [Thu, 2 Apr 2020 17:28:55 +0000 (19:28 +0200)]
Changed order of calloc args to match stdlib (2)
Although it is currently working, it's worth to stick with the stdlib definition to avoid further problems
Robert [Thu, 2 Apr 2020 17:23:10 +0000 (19:23 +0200)]
Changed order of calloc args to match stdlib
Although it is currently working, it's worth to stick with the stdlib definition to avoid further problems
Eric Haszlakiewicz [Thu, 2 Apr 2020 15:23:39 +0000 (11:23 -0400)]
Merge pull request #562 from dota17/testcase_add
Bugfix and testcases supplements
dota17 [Mon, 30 Mar 2020 09:32:06 +0000 (17:32 +0800)]
add test cases
Chen [Tue, 31 Mar 2020 02:54:45 +0000 (10:54 +0800)]
Merge pull request #561 from dota17/add_badge
add the badge in README.md and test the coveralls
dota17 [Mon, 30 Mar 2020 07:43:50 +0000 (15:43 +0800)]
add the badge in README.md and test the coveralls
Chen [Sat, 28 Mar 2020 02:42:17 +0000 (10:42 +0800)]
Merge pull request #541 from dota17/coveralls_final
add coveralls auto tool to json-c
dota17 [Wed, 19 Feb 2020 10:13:28 +0000 (18:13 +0800)]
modify the coveralls configuration file
Chen [Fri, 20 Mar 2020 03:17:20 +0000 (11:17 +0800)]
Merge pull request #558 from dota17/doc_message_modify
modify the doc target message
dota17 [Thu, 19 Mar 2020 02:23:29 +0000 (10:23 +0800)]
modify the doc target message
Eric Haszlakiewicz [Tue, 17 Mar 2020 02:24:14 +0000 (21:24 -0500)]
Merge pull request #556 from Jehan/wip/Jehan/fix-broken-mingw-w64
Fixes various Wreturn-type and Wimplicit-fallthrough errors on Mingw-w64
Jehan [Sun, 15 Mar 2020 22:29:37 +0000 (23:29 +0100)]
Fixes various Wreturn-type and Wimplicit-fallthrough errors on Mingw-w64
This is a recent regression since commit
6359b798479d379a3202e02c6a938d9b40c0d856 which added various assert(0)
calls (often replacing return-s).
With Ming-W64 compiler, json-c build was failing with various errors of
the sort:
> /home/jehan/dev/src/json-c/json_object.c: In function 'json_object_int_inc':
> /home/jehan/dev/src/json-c/json_object.c:841:1: error: control reaches end of non-void function [-Werror=return-type]
> 841 | }
> | ^
> In file included from /home/jehan/dev/src/json-c/json_object.c:17:
> /home/jehan/dev/src/json-c/json_object.c: In function 'json_object_get_double':
> /home/jehan/.local/share/crossroad/roads/w64/json-c/include/assert.h:76:4: error: this statement may fall through [-Werror=implicit-fallthrough=]
> 76 | (_assert(#_Expression,__FILE__,__LINE__),0))
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /home/jehan/dev/src/json-c/json_object.c:1070:7: note: in expansion of macro 'assert'
> 1070 | assert(0);
> | ^~~~~~
> /home/jehan/dev/src/json-c/json_object.c:1072:3: note: here
> 1072 | case json_type_boolean:
> | ^~~~
The problem is that Mingw-w64 does not consider assert() as a noreturn
(even assert(0)), because it has to be compatible by Microsoft
libraries. See the discussion here:
https://sourceforge.net/p/mingw-w64/bugs/306/
Instead let's create a new json_abort() function which is basically just
an abort() function with an optional message, for such cases where
abortion was non-conditional (using assert() and using the assertion
condition as a message here was clearly a misuse of the function). And
mark json_abort() as 'noreturn', as well as 'cold' for optimization
purpose (this is code we expect to never run, unless there is a bug,
that is).
Finally let's use this json_abort() instead of previous misused assert()
calls.
Eric Haszlakiewicz [Wed, 11 Mar 2020 03:12:13 +0000 (22:12 -0500)]
Merge pull request #546 from dota17/make_unistall
Add uninstall target in cmake
dota17 [Wed, 11 Mar 2020 02:47:04 +0000 (10:47 +0800)]
delete -r in uninstall
Eric Haszlakiewicz [Tue, 3 Mar 2020 13:54:21 +0000 (07:54 -0600)]
Merge pull request #547 from dota17/assert_test
modify json-c default build type, and fix up the assert() errors in t…
dota17 [Tue, 3 Mar 2020 06:16:13 +0000 (14:16 +0800)]
modify RELEASE
dota17 [Mon, 2 Mar 2020 12:19:35 +0000 (20:19 +0800)]
update testcase and delete debug -O0 build
Eric Haszlakiewicz [Mon, 2 Mar 2020 02:08:49 +0000 (02:08 +0000)]
Follow up the PR#542: improve assert() calls, simplify code in json_object_equal().
Eric Haszlakiewicz [Sun, 1 Mar 2020 13:51:26 +0000 (08:51 -0500)]
Merge pull request #542 from dota17/adduint64_final
add uint64 data to json-c
dota17 [Sat, 29 Feb 2020 07:32:42 +0000 (15:32 +0800)]
modify json-c default build type, and fix up the assert() errors in testcase
dota17 [Fri, 28 Feb 2020 03:18:48 +0000 (11:18 +0800)]
update json_object.c and testcase, delete json_object_uint_inc()
dota17 [Thu, 27 Feb 2020 07:01:06 +0000 (15:01 +0800)]
modify partial functions and testcase, in order to support automatic conversion for int64/uint64
dota17 [Thu, 27 Feb 2020 08:00:09 +0000 (16:00 +0800)]
Add uninstall target in cmake