public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/99567] New: internal error in extract_constrain_insn  with asan-stack
@ 2021-03-12 20:45 arnd at linaro dot org
  2021-03-13 16:14 ` [Bug rtl-optimization/99567] " arnd at linaro dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: arnd at linaro dot org @ 2021-03-12 20:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99567
           Summary: internal error in extract_constrain_insn  with
                    asan-stack
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: arnd at linaro dot org
  Target Milestone: ---

I ran into an internal compiler error while building linux kernels with the
kernel address sanitizer. Reduced it to this test case:

$ gcc-11 --version
gcc-11 (Ubuntu 11-20210306-1ubuntu1) 11.0.1 20210306 (experimental) [master
revision 574e7601829:6b84c9062bc:84185598dc7470bad4e7f8c22b64e3c944efb670]

$ cat tcp_ipv4.i

enum { a };
struct b {
  short c;
};
int d(void);
void e(int, _Bool *);
void f(struct b *, int *);
void g(struct b *h) {
  int i, l;
  volatile char j;
  struct b k = *h;
  void *m = h + k.c;
  l = *(int *)m;
  asm("" : : "g"(l));
lookup:
  i = j;
  int n = d();
  _Bool o = a;
  if (i)
    f(h, m);
  e(n, &o);
  goto lookup;
}

$ gcc-11 -fno-omit-frame-pointer  -fsanitize=address  --param
asan-instrumentation-with-call-threshold=10000  --param asan-stack=1 -c -O2
-Wall tcp_ipv4.i 
tcp_ipv4.i: In function ‘g’:
tcp_ipv4.i:23:1: error: unrecognizable insn:
   23 | }
      | ^
(insn 84 83 160 10 (parallel [
            (asm_operands/v ("") ("") 0 [
                    (mem:SI (mem/c:DI (plus:DI (reg/f:DI 6 bp)
                                (const_int -192 [0xffffffffffffff40])) [9
%sfp+-144 S8 A64]) [1 MEM[(int *)m_8]+0 S4 A32])
                ]
                 [
                    (asm_input:SI ("g") tcp_ipv4.i:14)
                ]
                 [] tcp_ipv4.i:14)
            (clobber (reg:CC 17 flags))
        ]) "tcp_ipv4.i":14:3 -1
     (nil))
during RTL pass: reload
tcp_ipv4.i:23:1: internal compiler error: in extract_constrain_insn, at
recog.c:2670
0xce2eb1 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        ../../src/gcc/rtl-error.c:108
0xce3057 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        ../../src/gcc/rtl-error.c:116
0x95f537 extract_constrain_insn(rtx_insn*)
        ../../src/gcc/recog.c:2670
0x95f537 extract_constrain_insn(rtx_insn*)
        ../../src/gcc/recog.c:2666
0x95f537 check_rtl
        ../../src/gcc/lra.c:2087
0x17962bc lra(_IO_FILE*)
        ../../src/gcc/lra.c:2505
0x1794579 do_reload
        ../../src/gcc/ira.c:5827
0x1794579 execute
        ../../src/gcc/ira.c:6013
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-11/README.Bugs> for instructions.

So far this only happened on x86 targets.

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

* [Bug rtl-optimization/99567] internal error in extract_constrain_insn  with asan-stack
  2021-03-12 20:45 [Bug rtl-optimization/99567] New: internal error in extract_constrain_insn with asan-stack arnd at linaro dot org
@ 2021-03-13 16:14 ` arnd at linaro dot org
  2021-03-13 16:14 ` arnd at linaro dot org
  2021-03-13 21:24 ` arnd at linaro dot org
  2 siblings, 0 replies; 4+ messages in thread
From: arnd at linaro dot org @ 2021-03-13 16:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Arnd Bergmann <arnd at linaro dot org> ---
*** Bug 99574 has been marked as a duplicate of this bug. ***

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

* [Bug rtl-optimization/99567] internal error in extract_constrain_insn  with asan-stack
  2021-03-12 20:45 [Bug rtl-optimization/99567] New: internal error in extract_constrain_insn with asan-stack arnd at linaro dot org
  2021-03-13 16:14 ` [Bug rtl-optimization/99567] " arnd at linaro dot org
@ 2021-03-13 16:14 ` arnd at linaro dot org
  2021-03-13 21:24 ` arnd at linaro dot org
  2 siblings, 0 replies; 4+ messages in thread
From: arnd at linaro dot org @ 2021-03-13 16:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Arnd Bergmann <arnd at linaro dot org> ---
*** Bug 99570 has been marked as a duplicate of this bug. ***

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

* [Bug rtl-optimization/99567] internal error in extract_constrain_insn  with asan-stack
  2021-03-12 20:45 [Bug rtl-optimization/99567] New: internal error in extract_constrain_insn with asan-stack arnd at linaro dot org
  2021-03-13 16:14 ` [Bug rtl-optimization/99567] " arnd at linaro dot org
  2021-03-13 16:14 ` arnd at linaro dot org
@ 2021-03-13 21:24 ` arnd at linaro dot org
  2 siblings, 0 replies; 4+ messages in thread
From: arnd at linaro dot org @ 2021-03-13 21:24 UTC (permalink / raw)
  To: gcc-bugs

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

Arnd Bergmann <arnd at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Arnd Bergmann <arnd at linaro dot org> ---
No longer reproducible with latest snapshot, I assume it was fixed.

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

end of thread, other threads:[~2021-03-13 21:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12 20:45 [Bug rtl-optimization/99567] New: internal error in extract_constrain_insn with asan-stack arnd at linaro dot org
2021-03-13 16:14 ` [Bug rtl-optimization/99567] " arnd at linaro dot org
2021-03-13 16:14 ` arnd at linaro dot org
2021-03-13 21:24 ` arnd at linaro dot 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).