Bug 103557 - [12 regression] ICE on tpm2-tss-3.0.3: during RTL pass: sched2: SIGSEGV in memory_operand()
Summary: [12 regression] ICE on tpm2-tss-3.0.3: during RTL pass: sched2: SIGSEGV in me...
Status: RESOLVED DUPLICATE of bug 103463
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 12.0
: P3 normal
Target Milestone: 12.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2021-12-04 17:26 UTC by Sergei Trofimovich
Modified: 2021-12-04 21:44 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich 2021-12-04 17:26:58 UTC
Noticed as an ICE in tpm2-tss-3.0.3 against weekly gcc-12 snapshot. Here is th extracted example:

$ cat a.c.c
// gcc-12.0.0 -O2  -c a.c.c -o a.o
struct {
  char sm3_256[32];
} TPMU_HA;
typedef struct {
  short size;
  char buffer[sizeof(TPMU_HA)];
} TPM2B_DIGEST;
typedef struct {
  TPM2B_DIGEST auths[3];
} TSS2L_SYS_AUTH_COMMAND;

void Tss2_Sys_Clear(TSS2L_SYS_AUTH_COMMAND);

void sysContext(void) {
  TPM2B_DIGEST nonce = {};
  TSS2L_SYS_AUTH_COMMAND sessionsDataIn = {{nonce}};
  Tss2_Sys_Clear(sessionsDataIn);
}


$ gcc-12.0.0 -O2  -c a.c.c -o a.o
during RTL pass: sched2
a.c.c: In function 'sysContext':
a.c.c:19:1: internal compiler error: Segmentation fault
   19 | }
      | ^
0x1e22687 internal_error(char const*, ...)
        ???:0
0xe7e43c memory_operand(rtx_def*, machine_mode)
        ???:0
0x167e598 get_attr_memory(rtx_insn*)
        ???:0
0x19a4bc0 insn_default_latency_generic(rtx_insn*)
        ???:0
0x1c74ad3 insn_sched_cost(rtx_insn*)
        ???:0
0x1c77934 dep_cost_1(_dep*, unsigned int)
        ???:0
0x1c79d7f set_priorities(rtx_insn*, rtx_insn*)
        ???:0
0xec28e2 compute_priorities()
        ???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ gcc-12.0.0 -v
Using built-in specs.
COLLECT_GCC=/nix/store/gqvmd777r63c5nvbrfwcgdlam0krmv4l-gcc-12.0.0/bin/gcc
COLLECT_LTO_WRAPPER=/nix/store/gqvmd777r63c5nvbrfwcgdlam0krmv4l-gcc-12.0.0/libexec/gcc/x86_64-unknown-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with:
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20211128 (experimental) (GCC)
Comment 1 Andrew Pinski 2021-12-04 20:19:47 UTC
There is a dup of this bug and it might already be fixed.
Comment 2 Andrew Pinski 2021-12-04 21:44:37 UTC
A dup of bug 103463.

*** This bug has been marked as a duplicate of bug 103463 ***