Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error: argument 1 null where non-null expected #23692

Closed
zonque opened this issue Oct 26, 2022 · 1 comment · Fixed by #23765
Closed

Build error: argument 1 null where non-null expected #23692

zonque opened this issue Oct 26, 2022 · 1 comment · Fixed by #23765
Assignees

Comments

@zonque
Copy link

zonque commented Oct 26, 2022

This is seen on Fedora 36 with gcc 12.2.1:

In file included from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/hashtable_policy.h:35,
                 from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/hashtable.h:35,
                 from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/unordered_map:46,
                 from /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/functional:61,
                 from external/v8/src/execution/isolate.h:10,
                 from external/v8/src/objects/js-temporal-objects.h:8,
                 from external/v8/src/objects/js-temporal-objects.cc:5:
In static member function 'static _Tp* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(const _Tp*, const _Tp*, _Tp*) [with _Tp = v8::internal::{anonymous}::Unit; bool _IsMove = false]',
    inlined from '_OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = const v8::internal::{anonymous}::Unit*; _OI = v8::internal::{anonymous}::Unit*]' at /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:495:30,
    inlined from '_OI std::__copy_move_a1(_II, _II, _OI) [with bool _IsMove = false; _II = const v8::internal::{anonymous}::Unit*; _OI = v8::internal::{anonymous}::Unit*]' at /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:522:42,
    inlined from '_OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = const v8::internal::{anonymous}::Unit*; _OI = v8::internal::{anonymous}::Unit*]' at /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:529:31,
    inlined from '_OI std::copy(_II, _II, _OI) [with _II = const v8::internal::{anonymous}::Unit*; _OI = v8::internal::{anonymous}::Unit*]' at /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:620:7,
    inlined from 'void std::vector<_Tp, _Alloc>::_M_assign_aux(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag) [with _ForwardIterator = const v8::internal::{anonymous}::Unit*; _Tp = v8::internal::{anonymous}::Unit; _Alloc = std::allocator<v8::internal::{anonymous}::Unit>]' at /usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/vector.tcc:330:19:
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:431:30: error: argument 1 null where non-null expected [-Werror=nonnull]
  431 |             __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
      |             ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:431:30: note: in a call to built-in function 'void* __builtin_memmove(void*, const void*, long unsigned int)'
@zonque zonque added the triage Issue requires triage label Oct 26, 2022
@KBaichoo KBaichoo added area/build and removed triage Issue requires triage labels Oct 31, 2022
@keith keith self-assigned this Oct 31, 2022
keith added a commit to keith/envoy that referenced this issue Oct 31, 2022
Since gcc 12 it seems there are some false positives around this
warning.

Upstream gcc reports:

- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107252
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100366
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106199

We can't use `--per_file_copt` in this case because we build this in the
host configuration bazelbuild/bazel#12406

Upstream v8 report: https://bugs.chromium.org/p/v8/issues/detail?id=13441

Fixes envoyproxy#23692

Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>
@keith
Copy link
Member

keith commented Oct 31, 2022

#23765

keith added a commit that referenced this issue Nov 1, 2022
Since gcc 12 it seems there are some false positives around this
warning.

Upstream gcc reports:

- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107252
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100366
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106199

We can't use `--per_file_copt` in this case because we build this in the
host configuration bazelbuild/bazel#12406

Upstream v8 report: https://bugs.chromium.org/p/v8/issues/detail?id=13441

Fixes #23692

Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants