public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/65805] New: [5/6 Regression] Chromium gets miscompiled
@ 2015-04-19  7:50 trippels at gcc dot gnu.org
  2015-04-19 10:20 ` [Bug rtl-optimization/65805] " trippels at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-04-19  7:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65805

            Bug ID: 65805
           Summary: [5/6 Regression] Chromium gets miscompiled
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org

Created attachment 35357
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35357&action=edit
unreduced testcase

Program received signal SIGSEGV, Segmentation fault.
0x000055555836d9be in
extensions::Manifest::HasPath(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&) const ()
(gdb) bt
#0  0x000055555836d9be in
extensions::Manifest::HasPath(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&) const ()
#1  0x000055555836e5a4 in
extensions::ManifestHandlerRegistry::ValidateExtension(extensions::Extension
const*, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, std::vector<extensions::InstallWarning,
std::allocator<extensions::InstallWarning> >*) ()
#2  0x000055555836c942 in
extensions::file_util::ValidateExtension(extensions::Extension const*,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>
>*, std::vector<extensions::InstallWarning,
std::allocator<extensions::InstallWarning> >*) ()
#3  0x000055555836cc28 in extensions::file_util::LoadExtension(base::FilePath
const&, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, extensions::Manifest::Location, int,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>
>*) ()
#4  0x000055555836cd19 in extensions::file_util::LoadExtension(base::FilePath
const&, extensions::Manifest::Location, int, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >*) ()
#5  0x00005555593aeaf2 in extensions::InstalledLoader::LoadAllExtensions() ()
#6  0x000055555938d3bf in ExtensionService::Init() ()
#7  0x0000555559395f47 in extensions::ExtensionSystemImpl::Shared::Init(bool)
()
#8  0x000055555939707a in
extensions::ExtensionSystemImpl::InitForRegularProfile(bool) ()
#9  0x000055555618d10f in ProfileManager::DoFinalInitForServices(Profile*,
bool) ()
#10 0x000055555618e262 in ProfileManager::DoFinalInit(Profile*, bool) ()
#11 0x000055555618fb88 in ProfileManager::AddProfile(Profile*) ()
#12 0x000055555618fe08 in
ProfileManager::CreateAndInitializeProfile(base::FilePath const&) ()
#13 0x0000555556190507 in ProfileManager::GetProfile(base::FilePath const&) ()
#14 0x00005555562729b8 in ChromeBrowserMainParts::PreMainMessageLoopRunImpl()
()
#15 0x000055555627388a in ChromeBrowserMainParts::PreMainMessageLoopRun() ()
#16 0x00005555589304af in content::BrowserMainLoop::PreMainMessageLoopRun() ()
#17 0x0000555558a3464f in content::StartupTaskRunner::RunAllTasksNow() ()
#18 0x0000555558935d3d in content::BrowserMainLoop::CreateStartupTasks() ()
#19 0x000055555873297c in
content::BrowserMainRunnerImpl::Initialize(content::MainFunctionParams const&)
()
#20 0x000055555873236d in content::BrowserMain(content::MainFunctionParams
const&) ()
#21 0x0000555556507ca9 in content::ContentMainRunnerImpl::Run() ()
#22 0x00005555565063f1 in content::ContentMain(content::ContentMainParams
const&) ()
#23 0x0000555555fecb1a in ChromeMain ()
#24 0x00007ffff619f6b0 in __libc_start_main () from /lib/libc.so.6
#25 0x0000555555fec9b9 in _start ()
(gdb) disass
Dump of assembler code for function
_ZNK10extensions8Manifest7HasPathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
   0x000055555836d9a0 <+0>:     push   %rbp
   0x000055555836d9a1 <+1>:     push   %rbx
   0x000055555836d9a2 <+2>:     mov    %rdi,%rbp
   0x000055555836d9a5 <+5>:     mov    %rsi,%rbx
   0x000055555836d9a8 <+8>:     sub    $0x18,%rsp
   0x000055555836d9ac <+12>:    movq   $0x0,0x8(%rsp)
   0x000055555836d9b5 <+21>:    callq  0x55555836d7d0
<_ZNK10extensions8Manifest13CanAccessPathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE>
   0x000055555836d9ba <+26>:    test   %al,%al
   0x000055555836d9bc <+28>:    je     0x55555836d9cf
<_ZNK10extensions8Manifest7HasPathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+47>
=> 0x000055555836d9be <+30>:    mov    0x30(%rbp),%rdi
   0x000055555836d9c2 <+34>:    lea    0x8(%rsp),%rdx
   0x000055555836d9c7 <+39>:    mov    %rbx,%rsi
   0x000055555836d9ca <+42>:    callq  0x5555565b3e10
<_ZN4base15DictionaryValue3GetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPPNS_5ValueE>
   0x000055555836d9cf <+47>:    add    $0x18,%rsp
   0x000055555836d9d3 <+51>:    pop    %rbx
   0x000055555836d9d4 <+52>:    pop    %rbp
   0x000055555836d9d5 <+53>:    retq   
End of assembler dump.

markus@x4 Release % g++ -MMD -MF
obj/extensions/common/extensions_common.file_util.o.d -DV8_DEPRECATION_WARNINGS
-D_FILE_OFFSET_BITS=64 -DDISABLE_NACL -DCHROMIUM_BUILD -DTOOLKIT_VIEWS=1
-DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1
-DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1
-DUSE_CLIPBOARD_AURAX11=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP
-DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1
-DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS
-DENABLE_HIDPI=1 -DUSE_UDEV -DDONT_EMBED_BUILD_METADATA -DENABLE_TASK_MANAGER=1
-DENABLE_EXTENSIONS=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1
-DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1
-DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1
-DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1
-DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1
-DENABLE_SUPERVISED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1
-DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD
-DSAFE_BROWSING_DB_LOCAL -DSAFE_BROWSING_SERVICE -DGL_GLEXT_PROTOTYPES
-DMOJO_USE_SYSTEM_IMPL -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0
-DU_STATIC_IMPLEMENTATION -DSK_SUPPORT_GPU=1 -DSK_LEGACY_DRAWPICTURECALLBACK
-DSK_SUPPORT_LEGACY_OPTIONLESS_GET_PIXELS -DLIBXML_STATIC -DUSE_LIBPCI=1
-DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_NSS=1 -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0
-D_FORTIFY_SOURCE=2 -Igen -I../.. -Iobj/extensions/extensions_common.gen
-I../../third_party/khronos -I../../gpu -I../../skia/config
-I../../third_party/WebKit/Source -I../../third_party/WebKit
-I../../third_party/mojo/src -Igen/third_party/mojo/src
-I../../third_party/icu/source/common -I../../third_party/re2
-I../../third_party/skia/include/core -I../../third_party/skia/include/effects
-I../../third_party/skia/include/pdf -I../../third_party/skia/include/gpu
-I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops
-I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports
-I../../third_party/skia/include/utils -I../../skia/ext
-I../../third_party/icu/source/i18n -I../../third_party/libxml/linux/include
-I../../third_party/libxml/src/include -Igen/extensions
-Igen/extensions/strings -I../../net/third_party/nss/ssl -fstack-protector
--param=ssp-buffer-size=4 -pthread -fno-strict-aliasing -Wall
-Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe
-fPIC -Wno-unused-local-typedefs -pthread -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -I/usr/include/nss -I/usr/include/nspr -m64
-march=x86-64 -O2 -fno-ident -fdata-sections -ffunction-sections
-funwind-tables -fno-exceptions -fno-rtti -fno-threadsafe-statics
-fvisibility-inlines-hidden -Wsign-compare -std=gnu++11 -Wno-narrowing
-Wno-literal-suffix -c *.ii -o
obj/extensions/common/extensions_common.file_util.o

-O1 is fine. -fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations
-O2 also crashes.

Will try to reduce this to a sinlge function later.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/65805] [5/6 Regression] Chromium gets miscompiled
  2015-04-19  7:50 [Bug tree-optimization/65805] New: [5/6 Regression] Chromium gets miscompiled trippels at gcc dot gnu.org
@ 2015-04-19 10:20 ` trippels at gcc dot gnu.org
  2015-04-19 10:52 ` trippels at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-04-19 10:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65805

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-04-19
                 CC|                            |vmakarov at gcc dot gnu.org
          Component|tree-optimization           |rtl-optimization
     Ever confirmed|0                           |1

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Adding __attribute__ ((optimize("-fno-lra-remat"))) to LoadExtension() fixes
the issue.

133170 __attribute__ ((optimize("-fno-lra-remat")))
133171 scoped_refptr<Extension> LoadExtension(const base::FilePath&
extension_path,
133172                                        const std::string& extension_id,
133173                                        Manifest::Location location,
133174                                        int flags,
133175                                        std::string* error) {
133176   scoped_ptr<base::DictionaryValue> manifest(
133177       LoadManifest(extension_path, error));
133178   if (!manifest.get())
133179     return
133180 # 197 "../../extensions/common/file_util.cc" 3 4
133181           __null
133182 # 197 "../../extensions/common/file_util.cc"
133183               ;
133184   if (!extension_l10n_util::LocalizeExtension(
133185           extension_path, manifest.get(), error)) {
133186     return
133187 # 200 "../../extensions/common/file_util.cc" 3 4
133188           __null
133189 # 200 "../../extensions/common/file_util.cc"
133190               ;
133191   }
133192
133193   scoped_refptr<Extension> extension(Extension::Create(
133194       extension_path, location, *manifest, flags, extension_id, error));
133195   if (!extension.get())
133196     return
133197 # 206 "../../extensions/common/file_util.cc" 3 4
133198           __null
133199 # 206 "../../extensions/common/file_util.cc"
133200               ;
133201
133202   std::vector<InstallWarning> warnings;
133203   if (!ValidateExtension(extension.get(), error, &warnings))
133204     return
133205 # 210 "../../extensions/common/file_util.cc" 3 4
133206           __null
133207 # 210 "../../extensions/common/file_util.cc"
133208               ;
133209   extension->AddInstallWarnings(warnings);
133210
133211   return extension;
133212 }
133213


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/65805] [5/6 Regression] Chromium gets miscompiled
  2015-04-19  7:50 [Bug tree-optimization/65805] New: [5/6 Regression] Chromium gets miscompiled trippels at gcc dot gnu.org
  2015-04-19 10:20 ` [Bug rtl-optimization/65805] " trippels at gcc dot gnu.org
@ 2015-04-19 10:52 ` trippels at gcc dot gnu.org
  2015-04-19 17:39 ` trippels at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-04-19 10:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65805

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
markus@x4 Release % g++ -S -fPIC -fvisibility=hidden -pthread -march=x86-64 -O2
-fno-exceptions -fno-rtti -std=gnu++11 -Wall -c file_util.ii -o ass_good        

markus@x4 Release % diff -u ass_good ass_bad
--- ass_good    2015-04-19 12:49:09.198287280 +0200
+++ ass_bad     2015-04-19 12:49:20.571371228 +0200
@@ -1,7 +1,7 @@
-.LCOLDB52:
+.LCOLDB51:
        .text
-.LHOTB52:
-       .p2align 4,,-1
+.LHOTB51:
+       .p2align 4,,15
        .globl 
_ZN10extensions9file_util13LoadExtensionERKN4base8FilePathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_8Manifest8LocationEiPSA_
        .hidden
_ZN10extensions9file_util13LoadExtensionERKN4base8FilePathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_8Manifest8LocationEiPSA_
        .type  
_ZN10extensions9file_util13LoadExtensionERKN4base8FilePathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_8Manifest8LocationEiPSA_,
@function
@@ -21,43 +21,43 @@
        pushq   %r12
        .cfi_def_cfa_offset 40
        .cfi_offset 12, -40
-       movq    %rsi, %r12
+       movq    %rsi, %r13
        pushq   %rbp
        .cfi_def_cfa_offset 48
        .cfi_offset 6, -48
        pushq   %rbx
        .cfi_def_cfa_offset 56
        .cfi_offset 3, -56
-       movq    %rdi, %rbp
+       movq    %rdi, %r12
        movq    %r9, %rdx
-       movq    %r12, %rdi
+       movq    %r13, %rdi
        movl    %r8d, %r14d
        subq    $56, %rsp
        .cfi_def_cfa_offset 112
        movq    _ZN10extensions17kManifestFilenameE@GOTPCREL(%rip), %rsi
-       movq    %r9, %rbx
+       movq    %r9, %rbp
        movl    %ecx, 4(%rsp)
        call   
_ZN10extensions9file_util12LoadManifestERKN4base8FilePathEPKcPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
        testq   %rax, %rax
-       je      .L614
-       movq    %rbx, %rdx
+       je      .L622
+       movq    %rbp, %rdx
        movq    %rax, %rsi
-       movq    %r12, %rdi
-       movq    %rax, %r13
+       movq    %r13, %rdi
+       movq    %rax, %rbx
        call   
_ZN19extension_l10n_util17LocalizeExtensionERKN4base8FilePathEPNS0_15DictionaryValueEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@PLT
        testb   %al, %al
-       jne     .L615
-.L613:
-       movq    $0, 0(%rbp)
-.L609:
-       movq    0(%r13), %rax
-       movq    %r13, %rdi
-       call    *8(%rax)
+       jne     .L623
+.L621:
+       movq    $0, (%r12)
 .L603:
+       movq    (%rbx), %rax
+       movq    %rbx, %rdi
+       call    *8(%rax)
+.L597:
        addq    $56, %rsp
        .cfi_remember_state
        .cfi_def_cfa_offset 56
-       movq    %rbp, %rax
+       movq    %r12, %rax
        popq    %rbx
        .cfi_def_cfa_offset 48
        popq    %rbp
@@ -73,66 +73,85 @@
        ret
        .p2align 4,,10
        .p2align 3
-.L615:
+.L623:
        .cfi_restore_state
        leaq    16(%rsp), %rax
        subq    $8, %rsp
        .cfi_def_cfa_offset 120
-       movq    %r12, %rsi
+       movq    %r13, %rsi
        movq    %r15, %r9
        movl    %r14d, %r8d
-       movq    %r13, %rcx
+       movq    %rbx, %rcx
        movq    %rax, 16(%rsp)
-       pushq   %rbx
+       pushq   %rbp
        .cfi_def_cfa_offset 128
        movl    20(%rsp), %edx
-       movq    24(%rsp), %rdi
+       leaq    64(%rsp), %rdi
        call   
_ZN10extensions9Extension6CreateERKN4base8FilePathENS_8Manifest8LocationERKNS1_15DictionaryValueEiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPSF_@PLT
-       movq    32(%rsp), %r12
+       movq    32(%rsp), %r13
        popq    %rax
        .cfi_def_cfa_offset 120
        popq    %rdx
        .cfi_def_cfa_offset 112
-       testq   %r12, %r12
-       je      .L613
+       testq   %r13, %r13
+       je      .L621
        movq    8(%rsp), %rdx
-       movq    %rbx, %rsi
-       movq    %r12, %rdi
+       movq    %rbp, %rsi
+       movq    %r13, %rdi
        movq    $0, 16(%rsp)
        movq    $0, 24(%rsp)
        movq    $0, 32(%rsp)
        call   
_ZN10extensions9file_util17ValidateExtensionEPKNS_9ExtensionEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPSt6vectorINS_14InstallWarningESaISC_EE
        testb   %al, %al
-       jne     .L610
-       movq    8(%rsp), %rdi
-       movq    $0, 0(%rbp)
-       call    _ZNSt6vectorIN10extensions14InstallWarningESaIS1_EED1Ev
-       leaq    8(%r12), %rdi
+       jne     .L604
+       movq    $0, (%r12)
+.L605:
+       movq    24(%rsp), %r14
+       movq    16(%rsp), %rbp
+       cmpq    %rbp, %r14
+       je      .L606
+       .p2align 4,,10
+       .p2align 3
+.L607:
+       movq    %rbp, %rdi
+       addq    $96, %rbp
+       call    _ZN10extensions14InstallWarningD1Ev@PLT
+       cmpq    %rbp, %r14
+       jne     .L607
+       movq    16(%rsp), %r14
+.L606:
+       testq   %r14, %r14
+       je      .L608
+       movq    %r14, %rdi
+       call    _ZdlPv@PLT
+.L608:
+       testq   %r13, %r13
+       je      .L603
+       leaq    8(%r13), %rdi
        call    _ZNK4base6subtle24RefCountedThreadSafeBase7ReleaseEv@PLT
        testb   %al, %al
-       je      .L609
-       movq    (%r12), %rax
-       movq    %r12, %rdi
+       je      .L603
+       movq    0(%r13), %rax
+       movq    %r13, %rdi
        call    *8(%rax)
-       jmp     .L609
+       jmp     .L603
        .p2align 4,,10
        .p2align 3
-.L614:
-       movq    $0, 0(%rbp)
-       jmp     .L603
+.L622:
+       movq    $0, (%r12)
+       jmp     .L597
        .p2align 4,,10
        .p2align 3
-.L610:
+.L604:
        movq    8(%rsp), %rsi
-       movq    %r12, %rdi
+       movq    %r13, %rdi
        call   
_ZN10extensions9Extension18AddInstallWarningsERKSt6vectorINS_14InstallWarningESaIS2_EE@PLT
-       movq    8(%rsp), %rdi
-       movq    %r12, 0(%rbp)
-       call    _ZNSt6vectorIN10extensions14InstallWarningESaIS1_EED1Ev
-       jmp     .L609
+       movq    %r13, (%r12)
+       xorl    %r13d, %r13d
+       jmp     .L605
        .cfi_endproc
 .LFE11121:
        .size  
_ZN10extensions9file_util13LoadExtensionERKN4base8FilePathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_8Manifest8LocationEiPSA_,
.-_ZN10extensions9file_util13LoadExtensionERKN4base8FilePathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_8Manifest8LocationEiPSA_
        .section        .text.unlikely
-.LCOLDE52:
+.LCOLDE51:
        .text


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/65805] [5/6 Regression] Chromium gets miscompiled
  2015-04-19  7:50 [Bug tree-optimization/65805] New: [5/6 Regression] Chromium gets miscompiled trippels at gcc dot gnu.org
  2015-04-19 10:20 ` [Bug rtl-optimization/65805] " trippels at gcc dot gnu.org
  2015-04-19 10:52 ` trippels at gcc dot gnu.org
@ 2015-04-19 17:39 ` trippels at gcc dot gnu.org
  2015-04-19 18:27 ` vmakarov at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-04-19 17:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65805

--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
It is clearer to see the issue if one compiles the whole file with
-fno-lra-remat:

markus@x4 Release % g++ -S -fno-lra-remat -fPIC -fvisibility=hidden -pthread
-march=x86-64 -O2 -fno-exceptions -fno-rtti -std=gnu++11 -Wall -c file_util.ii
-o out_good
markus@x4 Release % g++ -S -fPIC -fvisibility=hidden -pthread -march=x86-64 -O2
-fno-exceptions -fno-rtti -std=gnu++11 -Wall -c file_util.ii -o out_bad  
markus@x4 Release % diff -u out_good out_bad
...
@@ -4616,7 +4616,7 @@
        pushq   %rbp
        .cfi_def_cfa_offset 128
        movl    20(%rsp), %edx
-       movq    24(%rsp), %rdi
+       leaq    64(%rsp), %rdi
        call   
_ZN10extensions9Extension6CreateERKN4base8FilePathENS_8Manifest8LocationERKNS1_15DictionaryValueEiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPSF_@PLT
        movq    32(%rsp), %r13
        popq    %rax

When I change "leaq 64(%rsp), %rdi" back to "movq 24(%rsp), %rdi"
chromium runs fine.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/65805] [5/6 Regression] Chromium gets miscompiled
  2015-04-19  7:50 [Bug tree-optimization/65805] New: [5/6 Regression] Chromium gets miscompiled trippels at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-04-19 17:39 ` trippels at gcc dot gnu.org
@ 2015-04-19 18:27 ` vmakarov at gcc dot gnu.org
  2015-04-19 23:49 ` vmakarov at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2015-04-19 18:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65805

--- Comment #4 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Markus Trippelsdorf from comment #3)
> It is clearer to see the issue if one compiles the whole file with
> -fno-lra-remat:
> 
> markus@x4 Release % g++ -S -fno-lra-remat -fPIC -fvisibility=hidden -pthread
> -march=x86-64 -O2 -fno-exceptions -fno-rtti -std=gnu++11 -Wall -c
> file_util.ii -o out_good
> markus@x4 Release % g++ -S -fPIC -fvisibility=hidden -pthread -march=x86-64
> -O2 -fno-exceptions -fno-rtti -std=gnu++11 -Wall -c file_util.ii -o out_bad  
> markus@x4 Release % diff -u out_good out_bad
> ...
> @@ -4616,7 +4616,7 @@
>         pushq   %rbp
>         .cfi_def_cfa_offset 128
>         movl    20(%rsp), %edx
> -       movq    24(%rsp), %rdi
> +       leaq    64(%rsp), %rdi
>         call   
> _ZN10extensions9Extension6CreateERKN4base8FilePathENS_8Manifest8LocationERKNS
> 1_15DictionaryValueEiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPS
> F_@PLT
>         movq    32(%rsp), %r13
>         popq    %rax
> 
> When I change "leaq 64(%rsp), %rdi" back to "movq 24(%rsp), %rdi"
> chromium runs fine.

Thanks.  I reproduced the bug and started to work on it.  The problem is in
rematerialization when FP-SP offset is different at points of original insn and
rematerialized insn.  I hope the patch will be ready tomorrow.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/65805] [5/6 Regression] Chromium gets miscompiled
  2015-04-19  7:50 [Bug tree-optimization/65805] New: [5/6 Regression] Chromium gets miscompiled trippels at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-04-19 18:27 ` vmakarov at gcc dot gnu.org
@ 2015-04-19 23:49 ` vmakarov at gcc dot gnu.org
  2015-04-20  8:22 ` [Bug rtl-optimization/65805] [5 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2015-04-19 23:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65805

--- Comment #5 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Author: vmakarov
Date: Sun Apr 19 23:48:24 2015
New Revision: 222223

URL: https://gcc.gnu.org/viewcvs?rev=222223&root=gcc&view=rev
Log:
2015-04-19  Vladimir Makarov  <vmakarov@redhat.com>

    PR rtl-optimization/65805
    * lra-eliminations.c (lra_eliminate_regs_1): Add new assert.
    Don't use difference of offset and previous offset if
    update_sp_offset is non-zero.
    (eliminate_regs_in_insn): Ditto.
    * lra-spills.c (remove_pseudos): Exchange 4th and 6th args in
    lra_eliminate_regs_1 call.
    * lra-constraints.c (get_equiv_with_elimination): Ditto.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/lra-constraints.c
    trunk/gcc/lra-eliminations.c
    trunk/gcc/lra-spills.c


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/65805] [5 Regression] Chromium gets miscompiled
  2015-04-19  7:50 [Bug tree-optimization/65805] New: [5/6 Regression] Chromium gets miscompiled trippels at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-04-19 23:49 ` vmakarov at gcc dot gnu.org
@ 2015-04-20  8:22 ` rguenth at gcc dot gnu.org
  2015-04-23 19:08 ` vmakarov at gcc dot gnu.org
  2015-04-24  9:13 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-04-20  8:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65805

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |6.0
   Target Milestone|---                         |5.2
            Summary|[5/6 Regression] Chromium   |[5 Regression] Chromium
                   |gets miscompiled            |gets miscompiled
      Known to fail|                            |5.1.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/65805] [5 Regression] Chromium gets miscompiled
  2015-04-19  7:50 [Bug tree-optimization/65805] New: [5/6 Regression] Chromium gets miscompiled trippels at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2015-04-20  8:22 ` [Bug rtl-optimization/65805] [5 " rguenth at gcc dot gnu.org
@ 2015-04-23 19:08 ` vmakarov at gcc dot gnu.org
  2015-04-24  9:13 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2015-04-23 19:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65805

--- Comment #6 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Author: vmakarov
Date: Thu Apr 23 19:07:52 2015
New Revision: 222383

URL: https://gcc.gnu.org/viewcvs?rev=222383&root=gcc&view=rev
Log:
2015-04-23  Vladimir Makarov  <vmakarov@redhat.com>

    Backport from trunk r222223.

    2015-04-19  Vladimir Makarov  <vmakarov@redhat.com>

    PR rtl-optimization/65805
    * lra-eliminations.c (lra_eliminate_regs_1): Add new assert.
    Don't use difference of offset and previous offset if
    update_sp_offset is non-zero.
    (eliminate_regs_in_insn): Ditto.
    * lra-spills.c (remove_pseudos): Exchange 4th and 6th args in
    lra_eliminate_regs_1 call.
    * lra-constraints.c (get_equiv_with_elimination): Ditto.


Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/lra-constraints.c
    branches/gcc-5-branch/gcc/lra-eliminations.c
    branches/gcc-5-branch/gcc/lra-spills.c


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/65805] [5 Regression] Chromium gets miscompiled
  2015-04-19  7:50 [Bug tree-optimization/65805] New: [5/6 Regression] Chromium gets miscompiled trippels at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2015-04-23 19:08 ` vmakarov at gcc dot gnu.org
@ 2015-04-24  9:13 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-04-24  9:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65805

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|---                         |FIXED

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-04-24  9:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-19  7:50 [Bug tree-optimization/65805] New: [5/6 Regression] Chromium gets miscompiled trippels at gcc dot gnu.org
2015-04-19 10:20 ` [Bug rtl-optimization/65805] " trippels at gcc dot gnu.org
2015-04-19 10:52 ` trippels at gcc dot gnu.org
2015-04-19 17:39 ` trippels at gcc dot gnu.org
2015-04-19 18:27 ` vmakarov at gcc dot gnu.org
2015-04-19 23:49 ` vmakarov at gcc dot gnu.org
2015-04-20  8:22 ` [Bug rtl-optimization/65805] [5 " rguenth at gcc dot gnu.org
2015-04-23 19:08 ` vmakarov at gcc dot gnu.org
2015-04-24  9:13 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).