Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7953 Discussions

icx: error #10106: Fatal error in /opt/intel/oneapi/compiler/2023.0.0/linux/bin-llvm/clang, terminat

ColinIanKing
Beginner
1,330 Views

Hi, I'm using the icx compiler when building stress-ng and the compiler is eating up all my heap and then being killed.  I've managed to get a reproducer of the issue with the following snippet of code:

compile with: icx -c -DVERSION='"0.15.03"' -std=gnu99 -fstack-protector-strong debug-small.c

Note that removing the -fstack-protector-strong option makes the issue go away.

 

cat debug-small.c


#include <sys/types.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>

extern void __stack_chk_fail(void);
extern uint32_t stress_mwc32modn(const uint32_t max);
extern __attribute__((warn_unused_result)) ssize_t system_read(const char *path, char *buf, const size_t buf_len);
extern int __fprintf_chk (FILE *__restrict __stream, int __flag, const char *__restrict __format, ...);
static _Bool stress_stack_check_flag;

void stress_get_unused_pid_racy(const _Bool fork_test)
{
    pid_t pid;

   if (fork_test) {
      pid = fork();
      if (pid == 0) {
        _exit(0);
      } else if (pid > 0) {
        int status;

       waitpid(pid, &status, 0);
     }
  }
}


__attribute__ ((noreturn)) __attribute__ ((weak)) void __stack_chk_fail(void)
{
    if (stress_stack_check_flag) {
        (void)__fprintf_chk (stderr, 2 - 1, "Stack overflow detected! Aborting stress-ng.\n");
       (void)fflush(stderr);
       abort();
    }
    _exit(0);
}

Environment:

lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye

icx -v
Intel(R) oneAPI DPC++/C++ Compiler 2023.0.0 (2023.0.0.20221201)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/intel/oneapi/compiler/2023.0.0/linux/bin-llvm
Configuration file: /opt/intel/oneapi/compiler/2023.0.0/linux/bin-llvm/../bin/icx.cfg
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

Labels (1)
0 Kudos
4 Replies
NoorjahanSk_Intel
Moderator
1,265 Views

Hi,

 

Thanks for posting in Intel Communities.

 

We also tried it from our end and were able to reproduce the issue with -fstack-protector-strong flag with icx compiler.

 

We did not see any issues when we tried with -fstack-size-section flag.

Please refer to the below screenshot for more details:

NoorjahanSk_Intel_0-1675936416822.png

Please try with -fstack-size-section flag and let us know if you have any issues.

 

Thanks & Regards,

Noorjahan.

 

0 Kudos
ColinIanKing
Beginner
1,253 Views

-fstack-size-section allows me to compile, however it is semantically different from -fstack-protector-strong so I'm not sure where this is getting me.

0 Kudos
NoorjahanSk_Intel
Moderator
1,204 Views

Hi,


Thanks for reporting this issue with -fstack-protector-strong flag. We were able to reproduce it and we have informed the development team about it.



Thanks & Regards,

Noorjahan.


0 Kudos
NoorjahanSk_Intel
Moderator
1,068 Views

Hi,

 

Thank you for your patience.

The issue raised by you has been fixed in oneAPI C+ Compiler 2023.1.0 version which will be released in the coming months. If the issue still persists with the new release, then you can start a new discussion for the community to investigate

 

Thanks & Regards,

Noorjahan.

0 Kudos
Reply