[llvm-bugs] [Bug 51590] New: [POWERPC64*] llvm12 and later produces broken binaries on FreeBSD

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 23 12:06:52 PDT 2021


            Bug ID: 51590
           Summary: [POWERPC64*] llvm12 and later produces broken binaries
                    on FreeBSD
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: alfredo.junior at eldorado.org.br
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

LLVM12 and later (tested main branch at
2c5c06c5cfca7988b2d69a78459be27beb35a86f) produces broken binaries on FreeBSD
13 for powerpc64 and powerpc64le. The binaries will crash with segmentation.

Steps to reproduce using FreeBSD 13 RELEASE ISO:

1. Install llvm12 (apt install llvm12)
2. Create echo_crash.c:

#include <capsicum_helpers.h>
#include <err.h>

main(int argc, char *argv[])

        if (caph_limit_stdio() < 0 || caph_enter() < 0)
                err(1, "capsicum");
        return 0;

3. Compile with:

clang12 -O2 -g echo_crash.c -o echo_crash.good
clang12 -O2 -g -fstack-protector-strong echo_crash.c -o echo_crash.bad

4. Execute the binaries produced. 
   ./echo_crash.good: will produce no output and return normally. 
   ./echo_crash.bad: Segmentation Fault

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/20210823/60fcd716/attachment.html>

More information about the llvm-bugs mailing list