New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 618757 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocked on:
issue 603131



Sign in to add a comment

Compile error from v8

Project Member Reported by xidac...@chromium.org, Jun 9 2016

Issue description

Cc: vogelheim@chromium.org machenb...@chromium.org
Components: Blink>JavaScript

Comment 3 by oth@chromium.org, Jun 9 2016

Looks like the const brush missed a spot and upset MSVC. Attempted fix coming shortly.

FAILED: obj/v8/test/cctest/cctest/source-position-matcher.obj 
ninja -t msvc -e environment.x86 -- C:\b\build\slave\cache\cipd\goma/gomacc.exe "C:\b\depot_tools\win_toolchain\vs_files\95ddda401ec5678f15eeed01d2bee08fcbc5ee97\VC\bin\amd64_x86/cl.exe" /nologo /showIncludes /FC @obj/v8/test/cctest/cctest/source-position-matcher.obj.rsp /c ../../v8/test/cctest/interpreter/source-position-matcher.cc /Foobj/v8/test/cctest/cctest/source-position-matcher.obj /Fd"obj/v8/test/cctest/cctest_cc.pdb"
c:\b\depot_tools\win_toolchain\vs_files\95ddda401ec5678f15eeed01d2bee08fcbc5ee97\vc\include\xtree(2077): error C3848: expression having type 'const v8::internal::interpreter::PositionTableEntryComparer' would lose some const-volatile qualifiers in order to call 'bool v8::internal::interpreter::PositionTableEntryComparer::operator ()(const v8::internal::interpreter::PositionTableEntry &,const v8::internal::interpreter::PositionTableEntry &)'
c:\b\depot_tools\win_toolchain\vs_files\95ddda401ec5678f15eeed01d2bee08fcbc5ee97\vc\include\xtree(2076): note: while compiling class template member function 'bool std::_Tree<std::_Tset_traits<_Kty,_Pr,_Alloc,false>>::_Compare(const v8::internal::interpreter::PositionTableEntry &,const v8::internal::interpreter::PositionTableEntry &) const'
        with
        [
            _Kty=v8::internal::interpreter::PositionTableEntry,
            _Pr=v8::internal::interpreter::PositionTableEntryComparer,
            _Alloc=std::allocator<v8::internal::interpreter::PositionTableEntry>
        ]
c:\b\depot_tools\win_toolchain\vs_files\95ddda401ec5678f15eeed01d2bee08fcbc5ee97\vc\include\xtree(2094): note: see reference to function template instantiation 'bool std::_Tree<std::_Tset_traits<_Kty,_Pr,_Alloc,false>>::_Compare(const v8::internal::interpreter::PositionTableEntry &,const v8::internal::interpreter::PositionTableEntry &) const' being compiled
        with
        [
            _Kty=v8::internal::interpreter::PositionTableEntry,
            _Pr=v8::internal::interpreter::PositionTableEntryComparer,
            _Alloc=std::allocator<v8::internal::interpreter::PositionTableEntry>
        ]
c:\b\depot_tools\win_toolchain\vs_files\95ddda401ec5678f15eeed01d2bee08fcbc5ee97\vc\include\set(44): note: see reference to class template instantiation 'std::_Tree<std::_Tset_traits<_Kty,_Pr,_Alloc,false>>' being compiled
        with
        [
            _Kty=v8::internal::interpreter::PositionTableEntry,
            _Pr=v8::internal::interpreter::PositionTableEntryComparer,
            _Alloc=std::allocator<v8::internal::interpreter::PositionTableEntry>
        ]
c:\b\build\slave\win\build\src\v8\test\cctest\interpreter\source-position-matcher.cc(128): note: see reference to class template instantiation 'std::set<v8::internal::interpreter::PositionTableEntry,v8::internal::interpreter::PositionTableEntryComparer,std::allocator<_Ty>>' being compiled
        with
        [
            _Ty=v8::internal::interpreter::PositionTableEntry
        ]
Labels: -Pri-3 Pri-1
Blocking roll so this is clearly not nice to have :-).
Project Member

Comment 5 by bugdroid1@chromium.org, Jun 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/af10c45ef25dce86936e34138fcad30b0dc1464b

commit af10c45ef25dce86936e34138fcad30b0dc1464b
Author: oth <oth@chromium.org>
Date: Thu Jun 09 19:11:23 2016

[interpreter] Compilation fix in bytecode source position tester.

TBR=rmcilroy@chromium.org
BUG= chromium:618757 
LOG=N

Review-Url: https://codereview.chromium.org/2052993002
Cr-Commit-Position: refs/heads/master@{#36875}

[modify] https://crrev.com/af10c45ef25dce86936e34138fcad30b0dc1464b/test/cctest/interpreter/source-position-matcher.cc

Cc: hablich@chromium.org
Cc: brucedaw...@chromium.org scottmg@chromium.org
CC some win experts. Do you know which compiler option we have missed in our configs to not have caught this already in v8? Or is this an MSVS 2015 thing?
VS 2015 is definitely fussier about const. Technically I think it's VS 2015's implementation of STL that is fussier about const. I had to add (and sometimes remove) const from about a dozen places while porting Chrome to VS 2015. All of the problems were incorrect code that was not detected by gcc, clang, or VS 2013.

Comparison operators used by STL algorithms were one of the places where missing const is now caught, so yes, this seems to make sense.

Other than moving v8 to VS 2015 there is no practical way to catch this earlier.

Blockedon: 603131
Thanks, I'll mark it as blocked by the msvs switch, though it is not formally blocked. Just want to make the connection somehow.

This should be fixed as a v8-side fix is in and rolled into chromium.
Status: Fixed (was: Assigned)

Sign in to add a comment