platform/upstream/libatomic_ops.git
6 years agoAnnotate AO_malloc with 'alloc_size' and 'malloc' attributes
Ivan Maidanski [Fri, 1 Dec 2017 17:32:34 +0000 (20:32 +0300)]
Annotate AO_malloc with 'alloc_size' and 'malloc' attributes

* src/atomic_ops_malloc.h [!AO_ATTR_MALLOC] (AO_ATTR_MALLOC): New macro.
* src/atomic_ops_malloc.h [!AO_ATTR_ALLOC_SIZE] (AO_ATTR_ALLOC_SIZE):
Likewise.
* src/atomic_ops_malloc.h (AO_malloc): Add AO_ATTR_MALLOC,
AO_ATTR_ALLOC_SIZE attributes.

6 years agoFix AO_malloc for sizes near CHUNK_SIZE
Ivan Maidanski [Mon, 4 Dec 2017 20:28:01 +0000 (23:28 +0300)]
Fix AO_malloc for sizes near CHUNK_SIZE

Without this patch, e.g an object of CHUNK_SIZE is treated as non-large
in AO_malloc but freed by AO_free_large (incorrectly).

* src/atomic_ops_malloc.c (AO_malloc): Call AO_malloc_large() also for
size values in range CHUNK_SIZE-sizeof(AO_t)+1 .. CHUNK_SIZE.

6 years agoFix memory leak in test_malloc
Ivan Maidanski [Sun, 3 Dec 2017 07:14:33 +0000 (10:14 +0300)]
Fix memory leak in test_malloc

* tests/test_malloc.c (free_list): New function definition.
* tests/test_malloc.c (run_one_test): Call free_list(x) on return.

6 years agoUpdate ChangeLog file (v7.6 changes only)
Ivan Maidanski [Fri, 1 Dec 2017 17:00:15 +0000 (20:00 +0300)]
Update ChangeLog file (v7.6 changes only)

6 years agoTravis CI: Test with TSan when a 16-byte CAS is available
Ivan Maidanski [Tue, 28 Nov 2017 08:12:04 +0000 (11:12 +0300)]
Travis CI: Test with TSan when a 16-byte CAS is available

6 years agoTravis CI: Test also with GCC with ASan enabled
Ivan Maidanski [Mon, 20 Nov 2017 07:53:34 +0000 (10:53 +0300)]
Travis CI: Test also with GCC with ASan enabled
(Cherry-pick commits cb7cab3, 30d68cc, 40a49c9 from 'master' branch.)

6 years agoDefine AO_TS_SET to true (1) if GCC atomic_test_and_set is used
Ivan Maidanski [Tue, 28 Nov 2017 19:11:15 +0000 (22:11 +0300)]
Define AO_TS_SET to true (1) if GCC atomic_test_and_set is used
(fix commit 3315a03)

According to GCC manual about the built-in functions for memory model
aware atomic operations, __atomic_test_and_set returns bool value;
bool true is encoded as 1.

* src/atomic_ops/sysdeps/test_and_set_t_is_char.h [AO_PREFER_GENERALIZED
|| !__GCC_ATOMIC_TEST_AND_SET_TRUEVAL] (AO_TS_SET_TRUEVAL): Define to 1
(instead of 0xff).

6 years agoDo not use asm-based 16-byte CAS if compiled with TSan (Linux/x64)
Ivan Maidanski [Tue, 28 Nov 2017 08:28:32 +0000 (11:28 +0300)]
Do not use asm-based 16-byte CAS if compiled with TSan (Linux/x64)
(fix commit c058d9d)

Thread Sanitizer does not know the semantic of the asm synchronization
instructions.

* src/atomic_ops/sysdeps/gcc/x86.h [x86_64 && !ILP32
&& __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 && AO_THREAD_SANITIZER]
(AO_compare_double_and_swap_double_full): Do not define.

6 years agoEliminate data race in cons() of test_malloc
Ivan Maidanski [Tue, 28 Nov 2017 08:06:36 +0000 (11:06 +0300)]
Eliminate data race in cons() of test_malloc
(fix commit c058d9d)

The data race has not affected the functionality of the test but this
commit allows to avoid no_sanitize attribute for the function.

* tests/test_malloc.c (cons): Remove AO_ATTR_NO_SANITIZE_THREAD
attribute; Do not reset extra (use "%" operator to get my_extra value).
* tests/test_malloc.c [AO_HAVE_fetch_and_add1] (cons): Change type of
extra to AO_t, add volatile qualifier; use AO_fetch_and_add1 instead of
"++" operator to update extra.

6 years agoFix 'unknown attribute no_sanitize' compiler warning for GCC
Ivan Maidanski [Mon, 20 Nov 2017 06:56:25 +0000 (09:56 +0300)]
Fix 'unknown attribute no_sanitize' compiler warning for GCC
(fix commits 9020c5db6a3eee47c058d9dc637f7fe1)

* src/atomic_ops.h [!__has_feature && __SANITIZE_ADDRESS__]
(AO_ADDRESS_SANITIZER): Define.
* src/atomic_ops.h [!AO_ATTR_NO_SANITIZE_MEMORY && AO_MEMORY_SANITIZER
&& !AO_CLANG_PREREQ(3,8)] (AO_ATTR_NO_SANITIZE_MEMORY): Define to
__attribute__((no_sanitize_memory)).
* src/atomic_ops.h [!AO_ATTR_NO_SANITIZE_THREAD && AO_THREAD_SANITIZER
&& !AO_CLANG_PREREQ(3,8)] (AO_ATTR_NO_SANITIZE_THREAD): Define to
__attribute__((no_sanitize_thread)).

6 years agoPlace no_sanitize attributes in a GCC-compliant way
Ivan Maidanski [Sun, 19 Nov 2017 07:41:30 +0000 (10:41 +0300)]
Place no_sanitize attributes in a GCC-compliant way
(fix commits 9020c5dbc058d9dc)

Now the attributes precede the function prototypes (the format is:
<attribute> void f(void) <body>).

* src/atomic_ops/generalize-arithm.template
(AO_XSIZE_fetch_and_add_full, AO_XSIZE_fetch_and_add_acquire,
AO_XSIZE_fetch_and_add_release, AO_XSIZE_fetch_and_add,
AO_XSIZE_and_full, AO_XSIZE_or_full, AO_XSIZE_xor_full): Move
AO_ATTR_NO_SANITIZE_THREAD attribute to the beginning of the function
prototype (to be right before AO_INLINE).
* src/atomic_ops/generalize-small.template (AO_XSIZE_load_read,
AO_XSIZE_load_full, AO_XSIZE_load_acquire, AO_XSIZE_load,
AO_XSIZE_store_write, AO_XSIZE_store, AO_XSIZE_store_release,
AO_XSIZE_store_full): Likewise.
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_push_explicit_aux_release): Likewise.
* src/atomic_ops_stack.c [!USE_ALMOST_LOCK_FREE]
(AO_stack_push_release, AO_stack_pop_acquire): Likewise.
* tests/test_atomic.c [AO_HAVE_test_and_set_acquire] (do_junk):
Likewise.
* tests/test_malloc.c (cons): Likewise.
* src/atomic_ops/generalize-small.template (AO_XSIZE_store_write,
AO_XSIZE_store, AO_XSIZE_store_release, AO_XSIZE_store_full): Move
AO_ATTR_NO_SANITIZE_MEMORY attribute to the beginning of the function
prototype.
* src/atomic_ops/generalize-arithm.h: Regenerate.
* src/atomic_ops/generalize-small.h: Likewise.

6 years agoUpdate ChangeLog file (set v7.4.8 release date)
Ivan Maidanski [Thu, 26 Oct 2017 07:17:12 +0000 (10:17 +0300)]
Update ChangeLog file (set v7.4.8 release date)

6 years agoUpdate ChangeLog file (v7.6 changes only)
Ivan Maidanski [Fri, 13 Oct 2017 16:31:34 +0000 (19:31 +0300)]
Update ChangeLog file (v7.6 changes only)

6 years agoTravis CI: Test also 32-bit builds with --disable-atomic-intrinsics
Ivan Maidanski [Thu, 5 Oct 2017 22:59:55 +0000 (01:59 +0300)]
Travis CI: Test also 32-bit builds with --disable-atomic-intrinsics

6 years agoTravis CI: Test also 32-bit code with ASan (on OS X)
Ivan Maidanski [Thu, 5 Oct 2017 22:52:08 +0000 (01:52 +0300)]
Travis CI: Test also 32-bit code with ASan (on OS X)

6 years agoTravis CI: Test AO_GENERALIZE_ASM_BOOL_CAS, AO_USE_NANOSLEEP/NO_SIGNALS
Ivan Maidanski [Thu, 5 Oct 2017 22:48:28 +0000 (01:48 +0300)]
Travis CI: Test AO_GENERALIZE_ASM_BOOL_CAS, AO_USE_NANOSLEEP/NO_SIGNALS

6 years agoTravis CI: Test also with Leak Sanitizer (LSan)
Ivan Maidanski [Thu, 5 Oct 2017 22:39:01 +0000 (01:39 +0300)]
Travis CI: Test also with Leak Sanitizer (LSan)

6 years agoTravis CI: Add a test build with Thread sanitizer (TSan)
Ivan Maidanski [Thu, 21 Sep 2017 22:06:22 +0000 (01:06 +0300)]
Travis CI: Add a test build with Thread sanitizer (TSan)

6 years agoWorkaround TSan false positive warnings in stack_pop assertions
Ivan Maidanski [Thu, 5 Oct 2017 22:16:40 +0000 (01:16 +0300)]
Workaround TSan false positive warnings in stack_pop assertions

* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_pop_explicit_aux_acquire): Skip
assert(a->AO_stack_bl[i]==first) and assert(*list!=first)
if AO_THREAD_SANITIZER; add comment.

6 years agoWorkaround Thread Sanitizer (TSan) false positive warnings
Ivan Maidanski [Thu, 21 Sep 2017 08:36:30 +0000 (11:36 +0300)]
Workaround Thread Sanitizer (TSan) false positive warnings

* src/atomic_ops.h [__has_feature && __has_feature(thread_sanitizer)]
(AO_THREAD_SANITIZER): New internal macro.
* src/atomic_ops.h [!AO_ATTR_NO_SANITIZE_THREAD]
(AO_ATTR_NO_SANITIZE_THREAD): Likewise.
* src/atomic_ops/generalize-arithm.h: Regenerate.
* src/atomic_ops/generalize-small.h: Likewise.
* src/atomic_ops/generalize-arithm.template
(AO_XSIZE_fetch_and_add_full, AO_XSIZE_fetch_and_add_acquire,
AO_XSIZE_fetch_and_add_release, AO_XSIZE_fetch_and_add,
AO_XSIZE_and_full, AO_XSIZE_or_full, AO_XSIZE_xor_full): Add
AO_ATTR_NO_SANITIZE_THREAD attribute.
* src/atomic_ops/generalize-small.template (AO_XSIZE_load_read,
AO_XSIZE_load_full, AO_XSIZE_load_acquire, AO_XSIZE_load,
AO_XSIZE_store_write, AO_XSIZE_store, AO_XSIZE_store_release,
AO_XSIZE_store_full: Likewise.
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_push_explicit_aux_release): Likewise.
* src/atomic_ops_stack.c [AO_HAVE_compare_double_and_swap_double]
(AO_stack_push_release, AO_stack_pop_acquire): Likewise.
* tests/test_malloc.c (cons): Likewise.
* src/atomic_ops/sysdeps/gcc/x86.h [AO_GCC_ATOMIC_TEST_AND_SET
&& __clang__ && __x86_64__ && !__ILP32__ && AO_THREAD_SANITIZER]
(AO_SKIPATOMIC_double_compare_and_swap_ANY, AO_SKIPATOMIC_double_load,
AO_SKIPATOMIC_double_load_acquire, AO_SKIPATOMIC_double_store,
AO_SKIPATOMIC_double_store_release): Define; update comment.
* src/atomic_ops_malloc.c [AO_THREAD_SANITIZER] (AO_malloc, AO_free):
Use AO_store/load to write/read log_sz value in object header.
* tests/test_atomic.c (do_junk): New function (declared with
AO_ATTR_NO_SANITIZE_THREAD attribute); multiply junk value by two
different constant values.
* tests/test_atomic.c (test_and_set_thr): Call do_junk() instead of
operating on junk global variable directly.

6 years agoEliminate '-pedantic is not option that controls warnings' GCC-6.4 message
Ivan Maidanski [Wed, 27 Sep 2017 08:50:11 +0000 (11:50 +0300)]
Eliminate '-pedantic is not option that controls warnings' GCC-6.4 message
(fix commits 7633154, 7fad46e)

Issue #27 (libatomic_ops).

* src/atomic_ops/sysdeps/standard_ao_double_t.h
[(__x86_64__ && AO_GCC_ATOMIC_TEST_AND_SET || __aarch64__)
&& !__ILP32__ && AO_GNUC_PREREQ(4, 7)] (pragma GCC diagnostic):
Use "-Wpedantic" (instead of "-pedantic") if GCC v6.4+.

6 years agoFix 'bad register name %sil' assembler error (GCC-4.4/x86)
Ivan Maidanski [Thu, 5 Oct 2017 08:40:31 +0000 (11:40 +0300)]
Fix 'bad register name %sil' assembler error (GCC-4.4/x86)
(fix commit 7708b76)

* src/atomic_ops/sysdeps/gcc/x86.h [!AO_USE_SYNC_CAS_BUILTIN]
(AO_char_fetch_compare_and_swap_full): Replace "r"(new_val) to
"q"(new_val) in __asm__("cmpxchgb").

6 years agoTravis CI: Fix builds for avr32, cris, sh4, tilegx after OS image update
Ivan Maidanski [Thu, 21 Sep 2017 21:19:27 +0000 (00:19 +0300)]
Travis CI: Fix builds for avr32, cris, sh4, tilegx after OS image update

6 years agoUpdate ChangeLog file (v7.6 changes only)
Ivan Maidanski [Wed, 20 Sep 2017 21:35:15 +0000 (00:35 +0300)]
Update ChangeLog file (v7.6 changes only)

6 years agoUpdate ChangeLog file (v7.4 changes only)
Ivan Maidanski [Wed, 20 Sep 2017 08:31:29 +0000 (11:31 +0300)]
Update ChangeLog file (v7.4 changes only)
(Cherry-pick commit 1b48276 from 'release-7_4' branch.)

6 years agoTravis CI: Test configure --disable-docs
Ivan Maidanski [Thu, 3 Aug 2017 21:34:31 +0000 (00:34 +0300)]
Travis CI: Test configure --disable-docs

6 years agoDo not install documentation if configure --disable-docs (new option)
Ivan Maidanski [Thu, 3 Aug 2017 21:18:34 +0000 (00:18 +0300)]
Do not install documentation if configure --disable-docs (new option)

Issue #28 (libatomic_ops).

* Makefile.am (dist_doc_DATA): Define only if ENABLE_DOCS.
* doc/Makefile.am (dist_doc_DATA): Likewise.
* configure.ac (docs): New AC_ARG_ENABLE.
* configure.ac (ENABLE_DOCS): New AM_CONDITIONAL.

6 years agoEliminate '-pedantic is not an option that controls warnings' GCC message
Ivan Maidanski [Mon, 31 Jul 2017 06:41:23 +0000 (09:41 +0300)]
Eliminate '-pedantic is not an option that controls warnings' GCC message
(fix commit 7633154)

Issue #27 (libatomic_ops).

* src/atomic_ops/sysdeps/standard_ao_double_t.h
[(__x86_64__ && AO_GCC_ATOMIC_TEST_AND_SET || __aarch64__)
&& !__ILP32__ && AO_GNUC_PREREQ(4, 7)] (pragma GCC diagnostic):
Use "-Wpedantic" (instead of "-pedantic") if GCC v7+.

6 years agoWorkaround 'unused result' code defects in list_atomic.template
Ivan Maidanski [Mon, 24 Jul 2017 09:56:47 +0000 (12:56 +0300)]
Workaround 'unused result' code defects in list_atomic.template

* tests/list_atomic.template: Include stdlib.h (needed for exit()
prototype).
* tests/list_atomic.template [AO_HAVE_XSIZE_loadXX]
(XSIZE_list_atomicXX): Cast AO_XSIZE_loadXX() result to void.
* tests/list_atomic.template [AO_HAVE_XSIZE_fetch_and_addXX]: Cast
AO_XSIZE_fetch_and_addXX() result to void.
* tests/list_atomic.template [AO_HAVE_XSIZE_fetch_and_add1XX]
(XSIZE_list_atomicXX): Cast AO_XSIZE_fetch_and_add1XX() result to void.
* tests/list_atomic.template [AO_HAVE_XSIZE_fetch_and_sub1XX]
(XSIZE_list_atomicXX): Cast AO_XSIZE_fetch_and_sub1XX() result to void.
* tests/list_atomic.template [AO_HAVE_test_and_setXX]
(XSIZE_list_atomicXX): Cast AO_test_and_setXX() result to void.
* tests/list_atomic.template [AO_HAVE_XSIZE_compare_and_swapXX]
(XSIZE_list_atomicXX): Call exit(1) if AO_XSIZE_compare_and_swapXX
failed.
* tests/list_atomic.template [AO_HAVE_XSIZE_fetch_compare_and_swapXX]
(XSIZE_list_atomicXX): Call exit(1) if AO_XSIZE_fetch_compare_and_swapXX
failed.

6 years agoWorkaround 'unused result' code defect in atomic_ops.c
Ivan Maidanski [Mon, 24 Jul 2017 09:28:42 +0000 (12:28 +0300)]
Workaround 'unused result' code defect in atomic_ops.c

* src/atomic_ops.c [!AO_USE_NANOSLEEP && !AO_USE_WIN32_PTHREADS]
(AO_pause): Cast select() result to void.

6 years agoUpdate AUTHORS file (add Mikael Urankar)
Ivan Maidanski [Tue, 20 Jun 2017 09:23:15 +0000 (12:23 +0300)]
Update AUTHORS file (add Mikael Urankar)

6 years agoWorkaround misspelling in GCC to detect ARMv6KZ platform
Mikael Urankar [Mon, 19 Jun 2017 08:13:14 +0000 (10:13 +0200)]
Workaround misspelling in GCC to detect ARMv6KZ platform

Issue #26 (libatomic_ops).

Due to a misspelling in GCC, the check for the ARMv6KZ platform
uses ARM_ARCH_6ZK macro instead of ARM_ARCH_6KZ.

* src/atomic_ops/sysdeps/gcc/arm.h (AO_ARM_HAVE_DMB): Do not define
if __ARM_ARCH_6KZ__.

6 years agoAdd bdwgc mailing list online archive link to README
Ivan Maidanski [Thu, 15 Jun 2017 22:14:13 +0000 (01:14 +0300)]
Add bdwgc mailing list online archive link to README

* README.md (Feedback, Contribution, Questions and Notifications):
Update information about accessing the mailing list archive (add link
to that at Narkive site).

6 years agoUse GCC atomic intrinsics for Hexagon (clang 3.9+)
Ivan Maidanski [Fri, 9 Jun 2017 07:59:55 +0000 (10:59 +0300)]
Use GCC atomic intrinsics for Hexagon (clang 3.9+)

* src/atomic_ops/sysdeps/gcc/hexagon.h [AO_CLANG_PREREQ(3, 9)
&& !AO_DISABLE_GCC_ATOMICS] (AO_GCC_FORCE_HAVE_CAS,
AO_GCC_HAVE_double_SYNC_CAS): Define.
* src/atomic_ops/sysdeps/gcc/hexagon.h [AO_CLANG_PREREQ(3, 9)
&& !AO_DISABLE_GCC_ATOMICS]: Include standard_ao_double_t.h, generic.h.
* src/atomic_ops/sysdeps/gcc/hexagon.h [AO_CLANG_PREREQ(3, 9)
&& !AO_DISABLE_GCC_ATOMICS]: Do not include test_and_set_t_is_ao_t.h,
all_aligned_atomic_load_store.h.
* src/atomic_ops/sysdeps/gcc/hexagon.h [AO_CLANG_PREREQ(3, 9)
&& !AO_DISABLE_GCC_ATOMICS]: Do not define AO_nop_full,
AO_fetch_and_add, AO_test_and_set, AO_compare_and_swap,
AO_fetch_compare_and_swap, AO_T_IS_INT.

6 years agoFix 'missing select.h', 'undefined sigprocmask' compiler errors (Hexagon)
Ivan Maidanski [Thu, 8 Jun 2017 22:01:21 +0000 (01:01 +0300)]
Fix 'missing select.h', 'undefined sigprocmask' compiler errors (Hexagon)

* src/atomic_ops.c [__hexagon__ && !AO_USE_NO_SIGNALS
&& !AO_USE_NANOSLEEP] (AO_USE_NO_SIGNALS, AO_USE_NANOSLEEP): Define;
add comment.

6 years agoAvoid misleading 'AO_t undefined' error if wrong atomic_ops.h included
Ivan Maidanski [Thu, 8 Jun 2017 21:52:07 +0000 (00:52 +0300)]
Avoid misleading 'AO_t undefined' error if wrong atomic_ops.h included

This change might be useful e.g. in case of compilation by Hexagon SDK
which has own atomic_ops.h file (not related to libatomic_ops).

* tests/run_parallel.h [!CPPCHECK]: Issue #error if AO_ATOMIC_OPS_H is
not defined after #include atomic_ops.h.

6 years agoDo not produce .tar.bz2 distribution file (configure)
Ivan Maidanski [Thu, 8 Jun 2017 21:38:57 +0000 (00:38 +0300)]
Do not produce .tar.bz2 distribution file (configure)

* configure.ac (AM_INIT_AUTOMAKE): Remove dist-bzip2.

6 years agoUpdate README about bugs reporting and new releases notification
Ivan Maidanski [Fri, 2 Jun 2017 04:44:15 +0000 (07:44 +0300)]
Update README about bugs reporting and new releases notification
(Cherry-pick commit f705a8f from 'master' branch.)

* README.md (Download): Move (and update) information about bug reporting
to another section.
* README.md (Feedback, Contribution, Questions and Notifications): New
section.
* configure.ac (AC_INIT): Change URI for reporting bugs.

6 years agoUpdate several email addresses in AUTHORS file
Ivan Maidanski [Thu, 1 Jun 2017 18:55:26 +0000 (21:55 +0300)]
Update several email addresses in AUTHORS file

6 years agoTravis CI: Move 'gnu-tools' to home folder
Ivan Maidanski [Wed, 24 May 2017 21:39:59 +0000 (00:39 +0300)]
Travis CI: Move 'gnu-tools' to home folder

6 years agoTravis CI: Remove Coverity Scan for release-7_6 branch
Ivan Maidanski [Wed, 12 Jul 2017 09:36:02 +0000 (12:36 +0300)]
Travis CI: Remove Coverity Scan for release-7_6 branch
(revert commits 18f1ddd, 8fd0719)

7 years ago[7.6.0] v7.6.0
Ivan Maidanski [Fri, 19 May 2017 07:11:49 +0000 (10:11 +0300)]
[7.6.0]

Bump libatomic_ops version to 7.6.0

* ChangeLog (7.5.0): Bump version (to 7.6.0).
* .travis.yml (addons.coverity_scan.project.version): Likewise.
* README.md: Likewise.
* appveyor.yml (version): Likewise.
* configure.ac (AC_INIT): Likewise.
* src/atomic_ops/ao_version.h (AO_VERSION_MINOR): Likewise.
* ChangeLog (7.6.0, 7.4.6): Add release date.
* README.md: Remove build status indicators for "master" branch.
* src/Makefile.am (LIBATOMIC_OPS_GPL_VER_INFO): Change to 2:1:1
(increment revision number) because libatomic_ops_gpl.so implementation
has been updated (since the last change of the version info).
* src/Makefile.am (LIBATOMIC_OPS_VER_INFO): Change to 2:1:1 (just to
stay aligned with LIBATOMIC_OPS_GPL_VER_INFO).

7 years agoUpdate ChangeLog file (v7.2 - v7.4 changes only)
Ivan Maidanski [Thu, 18 May 2017 08:33:10 +0000 (11:33 +0300)]
Update ChangeLog file (v7.2 - v7.4 changes only)

7 years agoUse 'inline code' format for commands in README.md
Ivan Maidanski [Thu, 18 May 2017 08:13:24 +0000 (11:13 +0300)]
Use 'inline code' format for commands in README.md

* README.md: Quote commands with a grave accent character ("`"); the
same for names containing an underscore; reformat text.

7 years agoUpdate ChangeLog file (v7.4 changes)
Ivan Maidanski [Tue, 16 May 2017 12:52:34 +0000 (15:52 +0300)]
Update ChangeLog file (v7.4 changes)

7 years agoRename doc/README.txt to doc/README_details.txt
Ivan Maidanski [Tue, 16 May 2017 12:15:55 +0000 (15:15 +0300)]
Rename doc/README.txt to doc/README_details.txt

This is to differentiate from README.md when the documents are installed.

* doc/Makefile.am (dist_doc_DATA): Rename README.txt item to
README_details.txt.
* doc/README.txt: Rename to README_details.txt.

7 years agoUpdate ChangeLog file (v7.2 - v7.4 changes only)
Ivan Maidanski [Mon, 15 May 2017 20:17:10 +0000 (23:17 +0300)]
Update ChangeLog file (v7.2 - v7.4 changes only)

7 years agoTravis CI: Reformat .yml file by travis tool
Ivan Maidanski [Mon, 15 May 2017 19:44:38 +0000 (22:44 +0300)]
Travis CI: Reformat .yml file by travis tool

7 years agoTravis CI: Remove quotes and use single '=' in deploy:on:condition
Ivan Maidanski [Mon, 15 May 2017 17:42:49 +0000 (20:42 +0300)]
Travis CI: Remove quotes and use single '=' in deploy:on:condition
(fix commits 63238a5, 0cbf615)

7 years agoTravis CI: Remove parentheses in deploy:on:condition
Ivan Maidanski [Mon, 15 May 2017 17:38:02 +0000 (20:38 +0300)]
Travis CI: Remove parentheses in deploy:on:condition
(fix commit 63238a5)

7 years agoTravis CI: Setup dist tarball uploading to GitHub on tag creation
Ivan Maidanski [Mon, 15 May 2017 09:33:03 +0000 (12:33 +0300)]
Travis CI: Setup dist tarball uploading to GitHub on tag creation

7 years agoTravis CI: Move dist[check] test configs closer to the file beginning
Ivan Maidanski [Mon, 15 May 2017 09:24:31 +0000 (12:24 +0300)]
Travis CI: Move dist[check] test configs closer to the file beginning
(refactor commits 672aab2, 73162f6)

7 years agoEliminate 'value shift followed by expansion' false code defect warning
Ivan Maidanski [Thu, 11 May 2017 08:21:01 +0000 (11:21 +0300)]
Eliminate 'value shift followed by expansion' false code defect warning

* src/atomic_ops.c [AO_USE_NANOSLEEP] (AO_pause): Use "L" suffix for
shifted immediate value (1) to match the type of ts.tv_nsec.
* src/atomic_ops.c [!AO_USE_NANOSLEEP && AO_USE_WIN32_PTHREADS]
(AO_pause): Cast shifted immediate value (1) to DWORD to match Sleep
argument type.
* src/atomic_ops.c [!AO_USE_NANOSLEEP && !AO_USE_WIN32_PTHREADS]
(AO_pause): Store computed usec value to an intermediate int variable
(before storing it to tv.tv_usec) so that to avoid widening conversion
of shifted immediate int value (1); add comment.

7 years agoUpdate AUTHORS file (add Andy Li)
Ivan Maidanski [Wed, 10 May 2017 21:29:22 +0000 (00:29 +0300)]
Update AUTHORS file (add Andy Li)

7 years agoFix 'doc' files installation folder
Andy Li [Tue, 9 May 2017 01:42:14 +0000 (09:42 +0800)]
Fix 'doc' files installation folder

docs are dist_doc_DATA.  They should be installed to /usr/share/doc.

* Makefile.am (dist_pkgdata_DATA): Remove COPYING, README.md.
* Makefile.am (dist_doc_DATA): Add COPYING, README.md.
* doc/Makefile.am (dist_pkgdata_DATA): Remove LICENSING.txt,
README.txt, README_stack.txt, README_malloc.txt, README_win32.txt.
* doc/Makefile.am (dist_doc_DATA): Add LICENSING.txt,
README.txt, README_stack.txt, README_malloc.txt, README_win32.txt.

7 years agoUpdate ChangeLog file
Ivan Maidanski [Wed, 10 May 2017 07:50:56 +0000 (10:50 +0300)]
Update ChangeLog file

7 years agoUpdate ChangeLog file (v7.2 - v7.4 changes only)
Ivan Maidanski [Wed, 10 May 2017 06:18:23 +0000 (09:18 +0300)]
Update ChangeLog file (v7.2 - v7.4 changes only)

7 years agoTravis CI: Test also 'make distcheck'
Ivan Maidanski [Fri, 5 May 2017 18:53:14 +0000 (21:53 +0300)]
Travis CI: Test also 'make distcheck'

GNU autotools version:
* autoconf 2.69
* automake 1.15
* m4 1.4.18
* libtool 2.4.6

7 years agoTravis CI: Avoid quotes in build_command; fix indent of notification_email
Ivan Maidanski [Fri, 28 Apr 2017 07:38:54 +0000 (10:38 +0300)]
Travis CI: Avoid quotes in build_command; fix indent of notification_email
(fix commits 18f1ddd, bd4257b)

7 years agoTravis CI: Test also the distributive file creation
Ivan Maidanski [Thu, 27 Apr 2017 20:57:02 +0000 (23:57 +0300)]
Travis CI: Test also the distributive file creation

7 years agoTravis CI: Add notification_email property for Coverity Scan
Ivan Maidanski [Mon, 24 Apr 2017 18:16:41 +0000 (21:16 +0300)]
Travis CI: Add notification_email property for Coverity Scan
(fix commit 18f1ddd)

7 years agoWorkaround 'value of AO_CLEAR unknown' cppcheck info message
Ivan Maidanski [Mon, 24 Apr 2017 18:04:34 +0000 (21:04 +0300)]
Workaround 'value of AO_CLEAR unknown' cppcheck info message

* src/atomic_ops.h [AO_AO_TS_T || AO_CHAR_TS_T] (AO_CLEAR): Check
defined(AO_HAVE_CLEAR) instead of defined(AO_CLEAR).
* src/atomic_ops.h [AO_AO_TS_T || AO_CHAR_TS_T] (AO_HAVE_CLEAR): Define
(unless already defined).
* src/atomic_ops/sysdeps/gcc/generic.h (AO_HAVE_CLEAR): Define (along
with AO_CLEAR).
* src/atomic_ops/sysdeps/gcc/hppa.h (AO_HAVE_CLEAR): Likewise.
* src/atomic_ops/sysdeps/hpc/hppa.h (AO_HAVE_CLEAR): Likewise.

7 years agoWorkaround 'value of abort unknown' cppcheck info message
Ivan Maidanski [Mon, 24 Apr 2017 17:47:35 +0000 (20:47 +0300)]
Workaround 'value of abort unknown' cppcheck info message
(fix commit 9f4a38e)

* src/atomic_ops_malloc.c [_WIN32_WCE || __MINGW32CE__] (abort): Check
defined(AO_HAVE_abort) instead of defined(abort).
* tests/run_parallel.h [_WIN32_WCE || __MINGW32CE__] (abort): Likewise.
* tests/test_stack.c [_WIN32_WCE || __MINGW32CE__] (abort): Likewise.

7 years agoWorkaround 'uninitialized variable' cppcheck error in hpc/hppa.h
Ivan Maidanski [Mon, 24 Apr 2017 17:26:38 +0000 (20:26 +0300)]
Workaround 'uninitialized variable' cppcheck error in hpc/hppa.h

* src/atomic_ops/sysdeps/hpc/hppa.h [CPPCHECK] (AO_test_and_set_full):
Initialize "ret" local variable (to zero) before AO_ldcw call; add
comment.

7 years agoTravis CI: Fix build_command for Coverity Scan
Ivan Maidanski [Mon, 24 Apr 2017 08:37:44 +0000 (11:37 +0300)]
Travis CI: Fix build_command for Coverity Scan
(fix commit 18f1ddd)

7 years agoWorkaround 'resource leak' false positives in AO_malloc, add_elements
Ivan Maidanski [Fri, 21 Apr 2017 07:10:58 +0000 (10:10 +0300)]
Workaround 'resource leak' false positives in AO_malloc, add_elements

* src/atomic_ops_stack.c [AO_HAVE_compare_double_and_swap_double
&& LINT2] (AO_noop_sink): New global volatile variable.
* src/atomic_ops_stack.c [AO_HAVE_compare_double_and_swap_double
&& LINT2] (AO_stack_push_release): Store element value to AO_noop_sink;
add comment.

7 years agoWorkaround 'uninitialized memory use' code analyzer false warning (tests)
Ivan Maidanski [Wed, 19 Apr 2017 21:44:43 +0000 (00:44 +0300)]
Workaround 'uninitialized memory use' code analyzer false warning (tests)

* tests/test_atomic_include.template [AO_HAVE_storeXX && LINT2
&& AO_PREFER_GENERALIZED] (test_atomicXX): Initialize x local variable
(before AO_storeXX which can be defined using CAS); update comment.
* tests/test_atomic_include.template [AO_HAVE_short_storeXX && LINT2
&& AO_PREFER_GENERALIZED] (test_atomicXX): Initialize s local variable.
* tests/test_atomic_include.template [AO_HAVE_char_storeXX && LINT2
&& AO_PREFER_GENERALIZED] (test_atomicXX): Initialize b local variable.
* tests/test_atomic_include.template [AO_HAVE_int_storeXX && LINT2
&& AO_PREFER_GENERALIZED] (test_atomicXX): Initialize zz local variable.

7 years agoTravis CI: Test also by Coverity Scan
Ivan Maidanski [Wed, 19 Apr 2017 20:40:44 +0000 (23:40 +0300)]
Travis CI: Test also by Coverity Scan

7 years agoAdd Coverity Scan (static code analysis status) badge to README
Ivan Maidanski [Wed, 19 Apr 2017 20:32:11 +0000 (23:32 +0300)]
Add Coverity Scan (static code analysis status) badge to README

7 years agoWorkaround test_stack failure on AIX/ppc
Fabrizio Fabbri [Fri, 7 Apr 2017 13:56:04 +0000 (09:56 -0400)]
Workaround test_stack failure on AIX/ppc

* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_pop_explicit_aux_acquire): Replace AO_load to AO_load_acquire
when loaded value is compared to first; add comment.

7 years agoUse CLANG/GNUC_PREREQ macros in gcc/powerpc.h
Ivan Maidanski [Sat, 15 Apr 2017 06:56:36 +0000 (09:56 +0300)]
Use CLANG/GNUC_PREREQ macros in gcc/powerpc.h

* src/atomic_ops/sysdeps/gcc/powerpc.h: Use AO_GNUC_PREREQ() instead
of direct use of __GNUC[_MINOR]__; use AO_CLANG_PREREQ() instead of
direct use __clang_major__ and __clang_minor__.

7 years agoUse GCC atomic intrinsics for PowerPC 32/64 (GCC 4.8+ and clang 3.8+)
Ivan Maidanski [Fri, 5 Aug 2016 19:03:12 +0000 (22:03 +0300)]
Use GCC atomic intrinsics for PowerPC 32/64 (GCC 4.8+ and clang 3.8+)
(Cherry-pick commit 8e62b6f from 'ppc-gcc-atomics' branch.)

* src/atomic_ops/sysdeps/gcc/powerpc.h: Include generic.h and do not
include all_aligned_atomic_load_store.h, test_and_set_t_is_ao_t.h if
GCC 4.8+ or clang 3.8+ unless AO_DISABLE_GCC_ATOMICS.
* src/atomic_ops/sysdeps/gcc/powerpc.h (AO_nop_full, AO_lwsync,
AO_nop_write, AO_nop_read, AO_load_acquire, AO_store_release,
AO_test_and_set, AO_test_and_set_release, AO_test_and_set_full,
AO_compare_and_swap, AO_compare_and_swap_acquire,
AO_compare_and_swap_release, AO_compare_and_swap_full,
AO_fetch_compare_and_swap, AO_fetch_compare_and_swap_acquire,
AO_fetch_compare_and_swap_release, AO_fetch_compare_and_swap_full,
AO_fetch_and_add, AO_fetch_and_add_acquire, AO_fetch_and_add_release,
AO_fetch_and_add_full, AO_T_IS_INT): Do not define if generic.h is
included.

7 years agoUpdate ChangeLog file
Ivan Maidanski [Tue, 4 Apr 2017 20:03:59 +0000 (23:03 +0300)]
Update ChangeLog file

7 years agoUpdate ChangeLog file (v7.2 - v7.4 changes only)
Ivan Maidanski [Tue, 4 Apr 2017 08:35:50 +0000 (11:35 +0300)]
Update ChangeLog file (v7.2 - v7.4 changes only)

7 years agoChangeLog: remove trailing dots
Ivan Maidanski [Tue, 4 Apr 2017 08:18:14 +0000 (11:18 +0300)]
ChangeLog: remove trailing dots

7 years agoTravis CI: Test also with mingw-w64 cross-compiler
Ivan Maidanski [Mon, 3 Apr 2017 06:04:11 +0000 (09:04 +0300)]
Travis CI: Test also with mingw-w64 cross-compiler

7 years agoTravis CI: Set MAKEFILE_TARGET in 'matrix:include'
Ivan Maidanski [Mon, 3 Apr 2017 05:56:42 +0000 (08:56 +0300)]
Travis CI: Set MAKEFILE_TARGET in 'matrix:include'
(refactor commit 859f874a)

7 years agoTravis CI: Replace multiple CONF_x with a single CONF_OPTIONS variable
Ivan Maidanski [Tue, 28 Mar 2017 08:19:57 +0000 (11:19 +0300)]
Travis CI: Replace multiple CONF_x with a single CONF_OPTIONS variable
(code refactoring)

7 years agoRevert 'Fix store-load ordering in AO_stack_pop_explicit_aux_acquire'
Ivan Maidanski [Mon, 27 Mar 2017 07:17:28 +0000 (10:17 +0300)]
Revert 'Fix store-load ordering in AO_stack_pop_explicit_aux_acquire'

This reverts commit 85dd735949d712fa5db4bde0f0fc74f15a624222.

As reported in issue #15, adding AO_nop_full to
AO_stack_pop_explicit_aux_acquire does not solve test_stack failure
on Power7.

7 years agoTravis CI: Run cppcheck once per build configuration
Ivan Maidanski [Fri, 24 Mar 2017 16:20:12 +0000 (19:20 +0300)]
Travis CI: Run cppcheck once per build configuration
(refactoring of commit ff3885c)

7 years agoTravis CI: Move optional -D arguments of CSA to CFLAGS_EXTRA
Ivan Maidanski [Fri, 24 Mar 2017 16:02:18 +0000 (19:02 +0300)]
Travis CI: Move optional -D arguments of CSA to CFLAGS_EXTRA
(refactoring of commit 4393a96)

7 years agoTravis CI: Use inline format for some 'env' attributes
Ivan Maidanski [Fri, 24 Mar 2017 15:46:06 +0000 (18:46 +0300)]
Travis CI: Use inline format for some 'env' attributes

7 years agoTravis CI: Test also Intel x32 builds (Linux)
Ivan Maidanski [Thu, 23 Mar 2017 18:08:18 +0000 (21:08 +0300)]
Travis CI: Test also Intel x32 builds (Linux)

7 years agoTravis CI: Test also 32-bit, 64-bit builds with clang-4.0, gcc-5 (Linux)
Ivan Maidanski [Thu, 23 Mar 2017 18:02:46 +0000 (21:02 +0300)]
Travis CI: Test also 32-bit, 64-bit builds with clang-4.0, gcc-5 (Linux)

7 years agoTravis CI: Use inline format for 'packages' and 'sources'
Ivan Maidanski [Thu, 23 Mar 2017 17:57:48 +0000 (20:57 +0300)]
Travis CI: Use inline format for 'packages' and 'sources'
(refactoring of commit 6098194)

7 years agoTravis CI: Test also with -D _FORTIFY_SOURCE, -std=c11, -std=c89
Ivan Maidanski [Thu, 23 Mar 2017 07:37:59 +0000 (10:37 +0300)]
Travis CI: Test also with -D _FORTIFY_SOURCE, -std=c11, -std=c89

7 years agoTravis CI: Use -march=native for MSan/UBSan, musl-gcc, no atomic-intrinsics
Ivan Maidanski [Thu, 23 Mar 2017 07:29:45 +0000 (10:29 +0300)]
Travis CI: Use -march=native for MSan/UBSan, musl-gcc, no atomic-intrinsics

7 years agoTravis CI: Use CSA v4.0 (clang-4.0)
Ivan Maidanski [Thu, 23 Mar 2017 07:27:16 +0000 (10:27 +0300)]
Travis CI: Use CSA v4.0 (clang-4.0)

7 years agoTravis CI: Use inline format of 'addons' and 'env'
Ivan Maidanski [Thu, 23 Mar 2017 07:23:10 +0000 (10:23 +0300)]
Travis CI: Use inline format of 'addons' and 'env'
(code refactoring of commits d808080, 0f3f282)

7 years agoEliminate 'implicit declaration of close' warning in 'strict ANSI' mode
Ivan Maidanski [Thu, 23 Mar 2017 06:52:55 +0000 (09:52 +0300)]
Eliminate 'implicit declaration of close' warning in 'strict ANSI' mode

* src/atomic_ops_malloc.c [HAVE_MMAP && !USE_MMAP_ANON]: Include
unistd.h (to declare "close" function).

7 years agoFix block_all_signals compilation in 'strict ANSI' mode
Ivan Maidanski [Thu, 23 Mar 2017 06:41:37 +0000 (09:41 +0300)]
Fix block_all_signals compilation in 'strict ANSI' mode

* src/atomic_ops.c [(__linux__ || __GLIBC__ || __GNU__)
&& !AO_USE_NO_SIGNALS] (_GNU_SOURCE): Define (before including system
headers).

7 years agoTravis CI: Also test with musl-gcc (Linux)
Ivan Maidanski [Tue, 21 Mar 2017 09:01:26 +0000 (12:01 +0300)]
Travis CI: Also test with musl-gcc (Linux)

7 years agoTravis CI: Do not specify compiler for OS X builds
Ivan Maidanski [Mon, 20 Mar 2017 22:43:09 +0000 (01:43 +0300)]
Travis CI: Do not specify compiler for OS X builds

7 years agoTravis CI: Run CSA in a standalone test configuration
Ivan Maidanski [Mon, 20 Mar 2017 22:29:34 +0000 (01:29 +0300)]
Travis CI: Run CSA in a standalone test configuration

7 years agoTravis CI: Specify test configurations using 'matrix:include'
Ivan Maidanski [Mon, 20 Mar 2017 22:22:20 +0000 (01:22 +0300)]
Travis CI: Specify test configurations using 'matrix:include'
(code refactoring)

Also, require "sudo" only where needed.

7 years agoFix AO_SIZE_MAX definition (Linux/musl-gcc)
Ivan Maidanski [Wed, 15 Mar 2017 08:27:48 +0000 (11:27 +0300)]
Fix AO_SIZE_MAX definition (Linux/musl-gcc)
(fix commit b1365bd)

* src/atomic_ops_malloc.c [SIZE_MAX && !CPPCHECK] (AO_SIZE_MAX): Cast
SIZE_MAX to size_t explicitly (to workaround incorrect definition
of SIZE_MAX - e.g. it is defined as ~0ULL in musl-tools which is not
correct for a 32-bit target).

7 years agoRefine configure messages when checking for compiler options
Ivan Maidanski [Wed, 15 Mar 2017 08:22:26 +0000 (11:22 +0300)]
Refine configure messages when checking for compiler options

* configure.ac (AC_MSG_CHECKING, AC_MSG_RESULT): Refine message when
checking for a compiler option support (replace "gcc" with "compiler"),
and when reporting PIC option required; put string in [].
* configure.ac (AC_MSG_RESULT): Do not put string in quotes.

7 years agoTravis CI: Put a space after '-D', '-U' for cppcheck, clang, gcc
Ivan Maidanski [Fri, 10 Mar 2017 08:22:09 +0000 (11:22 +0300)]
Travis CI: Put a space after '-D', '-U' for cppcheck, clang, gcc
(refactoring of commits 4393a96, 797e428, ff3885c, 76825c7, 106bab9)

7 years agoWorkaround 'obsolescent ftime called' cppcheck style warning (POSIX)
Ivan Maidanski [Thu, 9 Mar 2017 04:53:32 +0000 (07:53 +0300)]
Workaround 'obsolescent ftime called' cppcheck style warning (POSIX)

* tests/test_stack.c [!NO_TIMES && (USE_WINTHREADS
|| AO_USE_WIN32_PTHREADS)] (get_msecs): Use gettimeofday-based
implementation if CPPCHECK.

7 years agoWorkaround 'shifting 32-bit value by 32 bits undefined' cppcheck warning
Ivan Maidanski [Thu, 9 Mar 2017 04:30:35 +0000 (07:30 +0300)]
Workaround 'shifting 32-bit value by 32 bits undefined' cppcheck warning

* src/atomic_ops_malloc.c [__SIZEOF_SIZE_T__==8] (msb): Ignore by
CPPCHECK.