New issue
Advanced search Search tips

Issue 791714 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug

Blocking:
issue 787920



Sign in to add a comment

ClangToTWin failing with indexed_ruleset.fbs(22): error: type referenced but not defined: url_pattern_index.flat.UrlPatternIndex

Project Member Reported by h...@chromium.org, Dec 4 2017

Issue description

From https://ci.chromium.org/buildbot/chromium.clang/ToTWin/572

FAILED: gen/components/subresource_filter/core/common/flat/indexed_ruleset_generated.h 
C:/b/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe ../../build/gn_run_binary.py flatc.exe -c --keep-prefix -o gen/components/subresource_filter/core/common/flat -I ../../ ../../components/subresource_filter/core/common/flat/indexed_ruleset.fbs
error: C:\b\c\b\ToTWin\src\components\subresource_filter\core\common\flat\indexed_ruleset.fbs(22): error: type referenced but not defined: url_pattern_index.flat.UrlPatternIndex
flatc.exe failed with exit
 

Comment 2 by h...@chromium.org, Dec 4 2017

Doesn't repro with pinned clang, so this appears to be a Clang regression.

Comment 3 by h...@chromium.org, Dec 4 2017

Blocking: 787920
Status: Started (was: Assigned)
Some suspects in the 319458:319500 range:

------------------------------------------------------------------------
r319468 | ctopper | 2017-11-30 12:15:31 -0800 (Thu, 30 Nov 2017) | 3 lines

[X86] Promote i8 CTPOP to i32 instead of i16 when we have the POPCNT instruction.

The 32-bit version is shorter to encode and the zext we emit for the promotion is likely going to be a 32-bit zero extend anyway.
------------------------------------------------------------------------

------------------------------------------------------------------------
r319482 | djg | 2017-11-30 14:10:53 -0800 (Thu, 30 Nov 2017) | 10 lines

[memcpyopt] Teach memcpyopt to optimize across basic blocks

This teaches memcpyopt to make a non-local memdep query when a local query
indicates that the dependency is non-local. This notably allows it to
eliminate many more llvm.memcpy calls in common Rust code, often by 20-30%.

Fixes PR28958.

Differential Revision: https://reviews.llvm.org/D38374

------------------------------------------------------------------------
r319483 | djg | 2017-11-30 14:13:13 -0800 (Thu, 30 Nov 2017) | 5 lines

[memcpyopt] Commit file missed in r319482.

This change was meant to be included with r319482 but was accidentally
omitted.

------------------------------------------------------------------------

------------------------------------------------------------------------
r319490 | rnk | 2017-11-30 14:41:21 -0800 (Thu, 30 Nov 2017) | 9 lines

XOR the frame pointer with the stack cookie when protecting the stack

Summary: This strengthens the guard and matches MSVC.

Reviewers: hans, etienneb

Subscribers: hiraditya, JDevlieghere, vlad.tsyrklevich, llvm-commits

Differential Revision: https://reviews.llvm.org/D40622
------------------------------------------------------------------------

Comment 4 by h...@chromium.org, Dec 4 2017

Cc: r...@chromium.org
It's r319490 I'm afraid.

Comment 5 by h...@chromium.org, Dec 4 2017

Reverted in r319706 to green the bots while investigating.

Comment 6 by h...@chromium.org, Dec 5 2017

Diffing the disassembly out\release\obj\third_party\flatbuffers\compiler_files\idl_parser.obj

Before the XOR patch:

?CheckInRange@Parser@flatbuffers@@QAE?AVCheckedError@2@_J00@Z (public: class flatbuffers::CheckedError __thiscall flatbuffers::Parser::CheckInRange(__int64,__int64,__int64)):
  00000000: 55                 push        ebp
  00000001: 89 E5              mov         ebp,esp
  00000003: 53                 push        ebx
  00000004: 57                 push        edi
  00000005: 56                 push        esi
  00000006: 83 EC 38           sub         esp,38h
  00000009: 8B 7D 14           mov         edi,dword ptr [ebp+14h]
  0000000C: A1 00 00 00 00     mov         eax,dword ptr [___security_cookie]
  00000011: 8B 55 10           mov         edx,dword ptr [ebp+10h]
  00000014: 8B 75 18           mov         esi,dword ptr [ebp+18h]
  00000017: 39 7D 0C           cmp         dword ptr [ebp+0Ch],edi
  0000001A: 89 45 F0           mov         dword ptr [ebp-10h],eax
  0000001D: 89 D0              mov         eax,edx
  0000001F: 19 F0              sbb         eax,esi
  00000021: 7D 5B              jge         0000007E


After:

?CheckInRange@Parser@flatbuffers@@QAE?AVCheckedError@2@_J00@Z (public: class flatbuffers::CheckedError __thiscall flatbuffers::Parser::CheckInRange(__int64,__int64,__int64)):
  00000000: 55                 push        ebp
  00000001: 89 E5              mov         ebp,esp
  00000003: 53                 push        ebx
  00000004: 57                 push        edi
  00000005: 56                 push        esi
  00000006: 83 EC 38           sub         esp,38h
  00000009: 8B 55 10           mov         edx,dword ptr [ebp+10h]
  0000000C: 8B 7D 14           mov         edi,dword ptr [ebp+14h]
  0000000F: 8B 75 0C           mov         esi,dword ptr [ebp+0Ch]
  00000012: A1 00 00 00 00     mov         eax,dword ptr [___security_cookie]
  00000017: 39 FE              cmp         esi,edi
  00000019: 89 D3              mov         ebx,edx
  0000001B: 31 E8              xor         eax,ebp    <----- Clobbers EFLAGS!
  0000001D: 1B 5D 18           sbb         ebx,dword ptr [ebp+18h]
  00000020: 89 45 F0           mov         dword ptr [ebp-10h],eax
  00000023: 7D 5B              jge         00000080


It looks like the newly inserted XOR clobbers EFLAGS.

I'm guessing we just need to declare that on the pseudo instructions...

Comment 7 by h...@chromium.org, Dec 5 2017

Status: Fixed (was: Started)
r319824

Sign in to add a comment