[llvm-bugs] [Bug 39410] New: [IA] clang hangs with `-no-integrated-as -Wa, -`

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Oct 23 11:30:29 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=39410

            Bug ID: 39410
           Summary: [IA] clang hangs with `-no-integrated-as -Wa,-`
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: libclang
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ndesaulniers at google.com
                CC: echristo at gmail.com, klimek at google.com,
                    llozano at chromium.org, llvm-bugs at lists.llvm.org,
                    natechancellor at gmail.com, srhines at google.com

>From https://lkml.org/lkml/2018/10/23/136.

The linux kernel as of 4.20 for x86_64 uses the flag `-Wa,-` with `-pipe`. 
This causes the use of `no-integrated-as` to hang the build.  I *think* `-pipe`
is a red herring.

ie.

$ clang hello_world.c -no-integrated-as -Wa,-

can reproduce the issue.  strace'ing with and without -Wa,-, I see:

with -Wa,-:
...
access("/usr/bin/as", F_OK)             = 0
...
wait4(167173, 


w/o: -Wa,-:
access("/usr/bin/as", F_OK)             = 0
...
wait4(167996, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 167996
...
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=167996,
si_uid=366559, si_status=0, si_utime=0, si_stime=1} ---

so however clang is invoking the non-integrated-as, it's not receiving SIGCHLD
in order to exit the `wait4`.

Looking at
$ strace gcc hello_world.c -Wa,-

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181023/1aad8c2b/attachment.html>


More information about the llvm-bugs mailing list