You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/08/14 19:59:00 UTC
[jira] [Commented] (DISPATCH-809) Add options to enable Sanitizers
to CMake build
[ https://issues.apache.org/jira/browse/DISPATCH-809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16126313#comment-16126313 ]
ASF GitHub Bot commented on DISPATCH-809:
-----------------------------------------
GitHub user jdanekrh opened a pull request:
https://github.com/apache/qpid-dispatch/pull/189
DISPATCH-809 Add options to enable Sanitizers to CMake build
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jdanekrh/qpid-dispatch jd_sanitizers
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/qpid-dispatch/pull/189.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #189
----
commit 34c70f703c09b1883ea125a3d0bbc4b528f6e535
Author: Jiri Danek <jd...@redhat.com>
Date: 2017-08-14T16:54:36Z
NO-JIRA Fix alloc-size-larger-than warning from gcc 7
The following warning is fixed by this commit
```
/home/jdanek/Work/repos/qpid-dispatch/src/entity.c: In function ‘qd_entity_set_stringf’:
/home/jdanek/Work/repos/qpid-dispatch/src/entity.c:235:10: error: argument 1 range [18446744071562067968, 18446744073709551615] exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
char buf[len+1];
^~~
/home/jdanek/Work/repos/qpid-dispatch/src/entity.c:235:10: note: in a call to built-in allocation function ‘__builtin_alloca_with_align’
/home/jdanek/Work/repos/qpid-dispatch/src/entity.c:235:10: error: argument 1 range [18446744071562067968, 18446744073709551615] exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
/home/jdanek/Work/repos/qpid-dispatch/src/entity.c:235:10: note: in a call to built-in allocation function ‘__builtin_alloca_with_align’
cc1: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/qpid-dispatch.dir/build.make:273: src/CMakeFiles/qpid-dispatch.dir/entity.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:982: src/CMakeFiles/qpid-dispatch.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
```
commit 1e9708be2fc79540c3228affd677ae85648be8b2
Author: Jiri Danek <jd...@redhat.com>
Date: 2017-08-14T19:48:18Z
NO-JIRA Silence clang 4 error: use of GNU statement expression extension
This fixes the following kind of warnings
/home/jdanek/Work/repos/qpid-dispatch/src/posix/threading.c:147:5: error: use of GNU statement expression extension [-Werror,-Wgnu-statement-expression]
assert(result == 0);
^
/nix/store/qy94v105wag3z9rgy1rb34zk0x20lkwj-glibc-2.25-dev/include/assert.h:95:6: note: expanded from macro 'assert'
({ \
^
commit de16048f3b577dbf7fc831475d02acaa9581e543
Author: Jiri Danek <jd...@redhat.com>
Date: 2017-08-14T19:36:50Z
DISPATCH-809 Add options to enable Sanitizers to CMake build
Tested to work with gcc 5.4.0, 7.1.0 and clang 4.0.1
----
> Add options to enable Sanitizers to CMake build
> -----------------------------------------------
>
> Key: DISPATCH-809
> URL: https://issues.apache.org/jira/browse/DISPATCH-809
> Project: Qpid Dispatch
> Issue Type: Improvement
> Affects Versions: 1.0.0
> Reporter: Jiri Danek
> Priority: Minor
>
> The usage is to first enable sanitizers during compilation
> {noformat}
> cmake .. -DUSE_SANITIZERS=ON -DProton_DIR=... -DCMAKE_BUILD_TYPE=Release
> {noformat}
> or
> {noformat}
> cmake .. -DUSE_TSAN=ON -DProton_DIR=... -DCMAKE_BUILD_TYPE=Release
> {noformat}
> (TSan is incompatible with the other sanitizers.)
> Then, either run unit tests with the usual {{ctest -VV}}, or run {{qdrouterd}}.
> Sanitizers can be given parameters in environment variable. For example, {{TSAN_OPTIONS="color=always" ctest -VV}} to see colored error messages in ctest output. Other options are described on the Sanitizers website, e.g. https://github.com/google/sanitizers/wiki/ThreadSanitizerFlags
> For best results, also compile Proton with sanitizers.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org