You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Wes McKinney (JIRA)" <ji...@apache.org> on 2018/06/03 00:52:00 UTC
[jira] [Comment Edited] (ARROW-2668) [C++]
-Wnull-pointer-arithmetic warning with dlmalloc.c on clang 6.0, Ubuntu
14.04
[ https://issues.apache.org/jira/browse/ARROW-2668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16499245#comment-16499245 ]
Wes McKinney edited comment on ARROW-2668 at 6/3/18 12:51 AM:
--------------------------------------------------------------
It looks like this warning was relatively recently added to LLVM https://reviews.llvm.org/D37042. We are using clang-format-6 in our Travis CI but not using clang itself when compiling which is probably why this issue hasn't come up yet
was (Author: wesmckinn):
It looks like this warning was relatively recently added to LLVM https://reviews.llvm.org/D37042
> [C++] -Wnull-pointer-arithmetic warning with dlmalloc.c on clang 6.0, Ubuntu 14.04
> -----------------------------------------------------------------------------------
>
> Key: ARROW-2668
> URL: https://issues.apache.org/jira/browse/ARROW-2668
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++
> Affects Versions: 0.9.0
> Reporter: Wes McKinney
> Priority: Major
> Fix For: 0.10.0
>
>
> I encountered this failure with {{-Werror}} on a nearly fresh Ubuntu 14.04 install using clang-6 from LLVM apt
> {code}
> ../src/plasma/thirdparty/dlmalloc.c:3504:68: error: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Werror,-Wnull-pointer-arithmetic]
> size_t mfree = m->topsize + (((((size_t)(((void*)((char*)(0) + ((sizeof(size_t))<<1)))) & (((size_t)(2 * sizeof(void *))) - ((size_t)1))) == 0)? 0 : ((((size_t)(2 * sizeof(void *))) - ((size_t)(((void*)((char*)(0) + ((sizeof(size_t))<<1)))) & (((size_t)(2 * sizeof(void *))) - ((size_t)1)))) & (((size_t)(2 * sizeof(void *))) - ((size_t)1))))+(((sizeof(struct malloc_segment)) + ((sizeof(size_t))) + (((size_t)(2 * sizeof(void *))) - ((size_t)1))) & ~(((size_t)(2 * sizeof(void *))) - ((size_t)1)))+(((sizeof(mchunk)) + (((size_t)(2 * sizeof(void *))) - ((size_t)1))) & ~(((size_t)(2 * sizeof(void *))) - ((size_t)1))));
> {code}
> See gist for complete log https://gist.github.com/wesm/61ee3592045bfaf390d5d4557f3c5a22
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)