<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libatomic_ops.git/tests, branch draft-coveralls-linux</title>
<subtitle>github.com: ivmai/libatomic_ops.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/'/>
<entry>
<title>Fix test_atomic failure caused unaligned AO_double_t access on x86</title>
<updated>2017-01-24T19:51:19+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2017-01-24T19:46:57+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=d1ad2daa7e195c82e3e5423e31af90fb01f7307d'/>
<id>d1ad2daa7e195c82e3e5423e31af90fb01f7307d</id>
<content type='text'>
The failure is caused by violation of an assertion that checks
AO_double_t variable is 8-byte aligned on x86.

* doc/README.txt (AO_double_t): Add note about required alignment.
* src/atomic_ops/sysdeps/standard_ao_double_t.h (AO_double_t): Add
comment about alignment.
* src/atomic_ops_stack.h (AO_stack_t): Likewise.
* tests/test_atomic_include.template (test_atomicXX): Define old_w, w
local variables as static (as otherwise, e.g., they could have 4-byte
alignment on x86); add comment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The failure is caused by violation of an assertion that checks
AO_double_t variable is 8-byte aligned on x86.

* doc/README.txt (AO_double_t): Add note about required alignment.
* src/atomic_ops/sysdeps/standard_ao_double_t.h (AO_double_t): Add
comment about alignment.
* src/atomic_ops_stack.h (AO_stack_t): Likewise.
* tests/test_atomic_include.template (test_atomicXX): Define old_w, w
local variables as static (as otherwise, e.g., they could have 4-byte
alignment on x86); add comment.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Fix test_atomic fail caused unaligned AO_double_t access (VC/x86)"</title>
<updated>2017-01-24T19:50:46+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2017-01-24T14:49:58+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=4949e9b8cb409288fcaa0553ead9704ca6219a23'/>
<id>4949e9b8cb409288fcaa0553ead9704ca6219a23</id>
<content type='text'>
This reverts commit 69c4010c1b3d43e2e179421e27379aaa5aeeb6d8.

The failure is actually caused by the fact that default alignment of
stack on x86 is 4 bytes.
So, another solution should be proposed to fix the issue for other
compilers (and, potentially, other targets).  E.g. do not place
AO_double_t volatile variables on stack.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 69c4010c1b3d43e2e179421e27379aaa5aeeb6d8.

The failure is actually caused by the fact that default alignment of
stack on x86 is 4 bytes.
So, another solution should be proposed to fix the issue for other
compilers (and, potentially, other targets).  E.g. do not place
AO_double_t volatile variables on stack.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix test_atomic failure caused unaligned AO_double_t access on x86 (VC++)</title>
<updated>2017-01-20T08:58:13+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2017-01-20T08:58:13+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=69c4010c1b3d43e2e179421e27379aaa5aeeb6d8'/>
<id>69c4010c1b3d43e2e179421e27379aaa5aeeb6d8</id>
<content type='text'>
Passing an unaligned AO_double_t pointer to AO double-wide primitives
results in an undefined behavior of the latter when running on x86 (or
violation of the corresponding assertion on the alignment).
MS VC++/x86 aligns AO_double_t values on a 4-byte boundary by default.
For the proper alignment, __declspec(align(8)) should be applied to
variables defined in the client code (which uses double-wide AO
primitives).  Unfortunately, the attribute cannot be added to
AO_double_t definition itself because the compiler does not allow the
attribute for function arguments.

This patch introduces AO_DOUBLE_ALIGN attribute for use by clients of
the double-wide AO primitives (and, thus, AO_stack clients).
Matters only Visual Studio compiler for X86.
The inner clients (atomic_ops_malloc, test_atomic, test_stack) are
updated to use this attribute.

* doc/README_win32.txt [x86] (AO_DOUBLE_ALIGN): Document.
* src/atomic_ops/sysdeps/generic_pthread.h (AO_DOUBLE_ALIGN): Define
(as empty).
* src/atomic_ops/sysdeps/standard_ao_double_t.h [!_WIN64 &amp;&amp; _WIN32
&amp;&amp; !__GNUC__ &amp;&amp; _MSC_VER] (AO_DOUBLE_ALIGN): Define as declspec
align(8); document it.
* src/atomic_ops/sysdeps/standard_ao_double_t.h [!AO_DOUBLE_ALIGN]
(AO_DOUBLE_ALIGN): Define as empty (otherwise).
* src/atomic_ops_stack.h [AO_USE_ALMOST_LOCK_FREE &amp;&amp; !AO_DOUBLE_ALIGN]
(AO_DOUBLE_ALIGN): Likewise.
* src/atomic_ops_malloc.c (AO_free_list): Use AO_DOUBLE_ALIGN attribute.
* tests/test_stack.c (the_list): Likewise.
* src/atomic_ops_stack.h [!AO_USE_ALMOST_LOCK_FREE] (AO_stack_t):
Document AO_DOUBLE_ALIGN usage (by clients).
* tests/test_atomic_include.template (test_atomicXX): Use
AO_DOUBLE_ALIGN attribute for old_w and w double-wide local variables
(to avoid alignment assertion violation or AO primitives undefined
behavior on x86 if the test code is compiled by VC++).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Passing an unaligned AO_double_t pointer to AO double-wide primitives
results in an undefined behavior of the latter when running on x86 (or
violation of the corresponding assertion on the alignment).
MS VC++/x86 aligns AO_double_t values on a 4-byte boundary by default.
For the proper alignment, __declspec(align(8)) should be applied to
variables defined in the client code (which uses double-wide AO
primitives).  Unfortunately, the attribute cannot be added to
AO_double_t definition itself because the compiler does not allow the
attribute for function arguments.

This patch introduces AO_DOUBLE_ALIGN attribute for use by clients of
the double-wide AO primitives (and, thus, AO_stack clients).
Matters only Visual Studio compiler for X86.
The inner clients (atomic_ops_malloc, test_atomic, test_stack) are
updated to use this attribute.

* doc/README_win32.txt [x86] (AO_DOUBLE_ALIGN): Document.
* src/atomic_ops/sysdeps/generic_pthread.h (AO_DOUBLE_ALIGN): Define
(as empty).
* src/atomic_ops/sysdeps/standard_ao_double_t.h [!_WIN64 &amp;&amp; _WIN32
&amp;&amp; !__GNUC__ &amp;&amp; _MSC_VER] (AO_DOUBLE_ALIGN): Define as declspec
align(8); document it.
* src/atomic_ops/sysdeps/standard_ao_double_t.h [!AO_DOUBLE_ALIGN]
(AO_DOUBLE_ALIGN): Define as empty (otherwise).
* src/atomic_ops_stack.h [AO_USE_ALMOST_LOCK_FREE &amp;&amp; !AO_DOUBLE_ALIGN]
(AO_DOUBLE_ALIGN): Likewise.
* src/atomic_ops_malloc.c (AO_free_list): Use AO_DOUBLE_ALIGN attribute.
* tests/test_stack.c (the_list): Likewise.
* src/atomic_ops_stack.h [!AO_USE_ALMOST_LOCK_FREE] (AO_stack_t):
Document AO_DOUBLE_ALIGN usage (by clients).
* tests/test_atomic_include.template (test_atomicXX): Use
AO_DOUBLE_ALIGN attribute for old_w and w double-wide local variables
(to avoid alignment assertion violation or AO primitives undefined
behavior on x86 if the test code is compiled by VC++).
</pre>
</div>
</content>
</entry>
<entry>
<title>Support CFLAGS_EXTRA to pass extra user-defined compiler flags (configure)</title>
<updated>2016-12-09T21:31:25+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2016-12-09T21:31:25+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=0c792a5408b7d1827f84e91052d6fb82a89ae40b'/>
<id>0c792a5408b7d1827f84e91052d6fb82a89ae40b</id>
<content type='text'>
* configure.ac: Add AC_SUBST(CFLAGS_EXTRA).
* src/Makefile.am (CFLAGS): Append $(CFLAGS_EXTRA).
* tests/Makefile.am (CFLAGS): Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* configure.ac: Add AC_SUBST(CFLAGS_EXTRA).
* src/Makefile.am (CFLAGS): Append $(CFLAGS_EXTRA).
* tests/Makefile.am (CFLAGS): Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>Workaround 'uninitialized memory use' MemorySanitizer warning (test_atomic)</title>
<updated>2016-12-05T17:26:16+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2016-12-05T17:26:16+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=8fc1a2ffc4bb47bf11e61864768810a9561c770b'/>
<id>8fc1a2ffc4bb47bf11e61864768810a9561c770b</id>
<content type='text'>
* tests/test_atomic_include.template (test_atomicXX): Ensure old_w is
always initialized before AO_double_storeXX; add comment about MSan
false warning.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* tests/test_atomic_include.template (test_atomicXX): Ensure old_w is
always initialized before AO_double_storeXX; add comment about MSan
false warning.
</pre>
</div>
</content>
</entry>
<entry>
<title>Do not define print_list() unless used (tests)</title>
<updated>2016-11-14T20:09:57+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2016-11-14T20:09:57+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=239ea5f3e998ef4aca873aba5ac6668eaa252b35'/>
<id>239ea5f3e998ef4aca873aba5ac6668eaa252b35</id>
<content type='text'>
* tests/test_malloc.c (print_list): Define only if DEBUG_RUN_ONE_TEST.
* tests/test_stack.c (print_list): Define only if VERBOSE.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* tests/test_malloc.c (print_list): Define only if DEBUG_RUN_ONE_TEST.
* tests/test_stack.c (print_list): Define only if VERBOSE.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add *_and/or/xor* and *_[fetch_]compare_and_swap* tests to test_atomic</title>
<updated>2016-11-01T09:18:33+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2016-11-01T09:18:33+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=020bdf20b8f972a32e93064b2d836aab1ed23d83'/>
<id>020bdf20b8f972a32e93064b2d836aab1ed23d83</id>
<content type='text'>
Previously, only AO_and/or/xor and AO_[fetch]_CAS tests (for AO_t)
existed in test_atomic.

* tests/test_atomic_include.template (test_atomicXX): Add minimal
testing of AO_short_compare_and_swapXX, AO_short_orXX, AO_short_xorXX,
AO_short_andXX, AO_short_fetch_compare_and_swapXX,
AO_char_compare_and_swapXX, AO_char_orXX, AO_char_xorXX, AO_char_andXX,
AO_char_fetch_compare_and_swapXX, AO_int_compare_and_swapXX,
AO_int_orXX, AO_int_xorXX, AO_int_andXX,
AO_int_fetch_compare_and_swapXX.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, only AO_and/or/xor and AO_[fetch]_CAS tests (for AO_t)
existed in test_atomic.

* tests/test_atomic_include.template (test_atomicXX): Add minimal
testing of AO_short_compare_and_swapXX, AO_short_orXX, AO_short_xorXX,
AO_short_andXX, AO_short_fetch_compare_and_swapXX,
AO_char_compare_and_swapXX, AO_char_orXX, AO_char_xorXX, AO_char_andXX,
AO_char_fetch_compare_and_swapXX, AO_int_compare_and_swapXX,
AO_int_orXX, AO_int_xorXX, AO_int_andXX,
AO_int_fetch_compare_and_swapXX.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix reporting about missing and/or/xor_dd_acquire_read (test_atomic)</title>
<updated>2016-11-01T08:25:39+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2016-11-01T08:25:39+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=9b5c548da220b8ffb07661c5c8fe0bbbee894725'/>
<id>9b5c548da220b8ffb07661c5c8fe0bbbee894725</id>
<content type='text'>
AO_XSIZE_and/or/xor_dd_acquire_read are meaningless and not implemented,
thus their absence is not reported in the tests.

* tests/test_atomic_include.template [!AO_HAVE_orXX] (test_atomicXX):
Do not call MISSING(AO_or) if all AO_HAVE_or* excluding
AO_HAVE_or_dd_acquire_read are not defined.
* tests/test_atomic_include.template [!AO_HAVE_xorXX] (test_atomicXX):
Do not call MISSING(AO_xor) if all AO_HAVE_xor* excluding
AO_HAVE_xor_dd_acquire_read are not defined.
* tests/test_atomic_include.template [!AO_HAVE_andXX] (test_atomicXX):
Do not call MISSING(AO_and) if all AO_HAVE_and* excluding
AO_HAVE_and_dd_acquire_read are not defined.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
AO_XSIZE_and/or/xor_dd_acquire_read are meaningless and not implemented,
thus their absence is not reported in the tests.

* tests/test_atomic_include.template [!AO_HAVE_orXX] (test_atomicXX):
Do not call MISSING(AO_or) if all AO_HAVE_or* excluding
AO_HAVE_or_dd_acquire_read are not defined.
* tests/test_atomic_include.template [!AO_HAVE_xorXX] (test_atomicXX):
Do not call MISSING(AO_xor) if all AO_HAVE_xor* excluding
AO_HAVE_xor_dd_acquire_read are not defined.
* tests/test_atomic_include.template [!AO_HAVE_andXX] (test_atomicXX):
Do not call MISSING(AO_and) if all AO_HAVE_and* excluding
AO_HAVE_and_dd_acquire_read are not defined.
</pre>
</div>
</content>
</entry>
<entry>
<title>Workaround 'function is never used' cppcheck style warnings</title>
<updated>2016-10-25T07:14:05+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2016-10-25T07:13:35+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=30596717d2c3580e826b4660efdf1b1926fa1073'/>
<id>30596717d2c3580e826b4660efdf1b1926fa1073</id>
<content type='text'>
* src/atomic_ops.h [AO_CAN_EMUL_CAS]: Include emul_cas.h also if
CPPCHECK (to define AO_store_full as AO_store_full_emulation).
* tests/test_atomic_include.template [CPPCHECK] (list_atomicXX,
char_list_atomicXX, short_list_atomicXX, int_list_atomicXX,
double_list_atomicXX): Declare function.
* tests/test_atomic_include.template test_atomicXX (test_atomicXX):
Call list_atomicXX, char_list_atomicXX, short_list_atomicXX,
int_list_atomicXX and double_list_atomicXX if CPPCHECK.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/atomic_ops.h [AO_CAN_EMUL_CAS]: Include emul_cas.h also if
CPPCHECK (to define AO_store_full as AO_store_full_emulation).
* tests/test_atomic_include.template [CPPCHECK] (list_atomicXX,
char_list_atomicXX, short_list_atomicXX, int_list_atomicXX,
double_list_atomicXX): Declare function.
* tests/test_atomic_include.template test_atomicXX (test_atomicXX):
Call list_atomicXX, char_list_atomicXX, short_list_atomicXX,
int_list_atomicXX and double_list_atomicXX if CPPCHECK.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add dd_acquire_read case to test_atomic</title>
<updated>2016-10-24T22:07:49+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2016-10-24T22:07:49+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=d36197cd080ac6fea8e5feb1ef880cf6fe358ea3'/>
<id>d36197cd080ac6fea8e5feb1ef880cf6fe358ea3</id>
<content type='text'>
* tests/Makefile.am (test_atomic_include.h): Add "_dd_acquire_read"
test generation.
* tests/test_atomic.c [!AO_NO_PTHREADS || !AO_USE_PTHREAD_DEFS] (main):
Call test_atomic_dd_acquire_read().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* tests/Makefile.am (test_atomic_include.h): Add "_dd_acquire_read"
test generation.
* tests/test_atomic.c [!AO_NO_PTHREADS || !AO_USE_PTHREAD_DEFS] (main):
Call test_atomic_dd_acquire_read().
</pre>
</div>
</content>
</entry>
</feed>
