Closed Bug 1624138 Opened 4 years ago Closed 4 years ago

rlbox_type_traits.hpp:471:1: error: ambiguous partial specializations of 'convert_base_types_t_helper<gr_face_options, short, int, long, long long, unsigned long, void>'

Categories

(Core :: Security: Process Sandboxing, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: Sylvestre, Assigned: shravanrn)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Building with clang 11 & libc++ 11~++20200320115124+fd7300f717c-1 (it was working with 11~++20200318013805+a0a3a9c5a83-1).
I didn't check yet if this is our code or clang yet

In file included from Unified_cpp_gfx_thebes0.cpp:83:
In file included from /var/lib/jenkins/workspace/firefox-clang-libc++/gfx/thebes/gfxFont.cpp:48:
In file included from /var/lib/jenkins/workspace/firefox-clang-libc++/gfx/thebes/ThebesRLBox.h:22:
In file included from /var/lib/jenkins/workspace/firefox-clang-libc++/obj-x86_64-pc-linux-gnu/dist/include/mozilla/rlbox/rlbox.hpp:9:
In file included from /var/lib/jenkins/workspace/firefox-clang-libc++/obj-x86_64-pc-linux-gnu/dist/include/mozilla/rlbox/rlbox_conversion.hpp:11:
/var/lib/jenkins/workspace/firefox-clang-libc++/obj-x86_64-pc-linux-gnu/dist/include/mozilla/rlbox/rlbox_type_traits.hpp:471:1: error: ambiguous partial specializations of 'convert_base_types_t_helper<gr_face_options, short, int, long, long long, unsigned long, void>'
using convert_base_types_t =
^
/var/lib/jenkins/workspace/firefox-clang-libc++/obj-x86_64-pc-linux-gnu/dist/include/mozilla/rlbox/rlbox_sandbox.hpp:319:3: note: in instantiation of template type alias 'convert_base_types_t' requested here
  using convert_to_sandbox_equivalent_nonclass_t =
  ^
/var/lib/jenkins/workspace/firefox-clang-libc++/obj-x86_64-pc-linux-gnu/dist/include/mozilla/rlbox/rlbox.hpp:801:3: note: in instantiation of template type alias 'convert_to_sandbox_equivalent_nonclass_t' requested here
  using tainted_vol_repr_t =
  ^
/var/lib/jenkins/workspace/firefox-clang-libc++/obj-x86_64-pc-linux-gnu/dist/include/mozilla/rlbox/rlbox.hpp:834:43: note: in instantiation of template type alias 'tainted_vol_repr_t' requested here
  using T_SandboxedType = tainted_detail::tainted_vol_repr_t<T, T_Sbx>;
                                          ^
/var/lib/jenkins/workspace/firefox-clang-libc++/obj-x86_64-pc-linux-gnu/dist/include/mozilla/rlbox/rlbox_sandbox.hpp:191:31: note: in instantiation of template class 'rlbox::tainted<gr_face_options, rlbox::rlbox_noop_sandbox>' requested here
      tainted<T_NoRef, T_Sbx> ret = param;
                              ^
/var/lib/jenkins/workspace/firefox-clang-libc++/obj-x86_64-pc-linux-gnu/dist/include/mozilla/rlbox/rlbox_sandbox.hpp:617:9: note: in instantiation of function template specialization 'rlbox::rlbox_sandbox<rlbox::rlbox_noop_sandbox>::invoke_process_param<gr_face_options &>' requested here
        invoke_process_param(params)...);
        ^
/var/lib/jenkins/workspace/firefox-clang-libc++/gfx/thebes/gfxFontEntry.cpp:720:17: note: in instantiation of function template specialization 'rlbox::rlbox_sandbox<rlbox::rlbox_noop_sandbox>::INTERNAL_invoke_with_func_ptr<gr_face *(const void *, const gr_face_ops *, unsigned int), rlbox::tainted<gr_face_ops *, rlbox::rlbox_noop_sandbox> &, rlbox::tainted<gr_face_ops *, rlbox::rlbox_noop_sandbox> &, gr_face_options>' requested here
    auto face = sandbox_invoke(
                ^
/var/lib/jenkins/workspace/firefox-clang-libc++/obj-x86_64-pc-linux-gnu/dist/include/mozilla/rlbox/rlbox_sandbox.hpp:852:13: note: expanded from macro 'sandbox_invoke'
  (sandbox).invoke_sandbox_function(func_name, ##__VA_ARGS__)
            ^
/var/lib/jenkins/workspace/firefox-clang-libc++/obj-x86_64-pc-linux-gnu/dist/include/mozilla/rlbox/rlbox_sandbox.hpp:831:14: note: expanded from macro 'invoke_sandbox_function'
    template INTERNAL_invoke_with_func_ptr<decltype(func_name)>(               \
             ^
/var/lib/jenkins/workspace/firefox-clang-libc++/obj-x86_64-pc-linux-gnu/dist/include/mozilla/rlbox/rlbox_type_traits.hpp:378:10: note: partial specialization matches [with T = gr_face_options, T_ShortType = short, T_IntType = int, T_LongType = long, T_LongLongType = long long, T_PointerType = unsigned long]
  struct convert_base_types_t_helper<
         ^
/var/lib/jenkins/workspace/firefox-clang-libc++/obj-x86_64-pc-linux-gnu/dist/include/mozilla/rlbox/rlbox_type_traits.hpp:403:10: note: partial specialization matches [with T = gr_face_options, T_ShortType = short, T_IntType = int, T_LongType = long, T_LongLongType = long long, T_PointerType = unsigned long]
  struct convert_base_types_t_helper<
         ^

Hmm, I wasn't able to reproduce this with fd7300f717c. I didn't have libc++ but judging by the error message it shouldn't be involved here.

This is only failing when libc++ is used with clang-11:

export CXXFLAGS="-stdlib=libc++ -Wno-error=pessimizing-move -Wlarge-by-value-copy=128  -D_LIBCPP_NO_EXCEPTIONS"

Hmm... Let me quickly see if the rlbox component (the code in which the above build issue occurs) passes tests with clang-11, libc++ and the specified flags.

Ok, I was able to repro the issue with clang 11 and libc++ on the rlbox code alone. Will fix and update rlbox code in tree.

Assignee: nobody → shravanrn
Priority: -- → P1
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a45ebe808a75
Bump to latest rlbox that fixes partial specialization err in clang11 + libc++. r=froydnj
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76

Confirmed that it is fixed, thanks

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: