[llvm-bugs] [Bug 48510] New: Safestack option crashes when used on 32-bit builds

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Dec 14 17:15:08 PST 2020


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

            Bug ID: 48510
           Summary: Safestack option crashes when used on 32-bit builds
           Product: compiler-rt
           Version: 11.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: compiler-rt
          Assignee: unassignedbugs at nondot.org
          Reporter: shravanrn at gmail.com
                CC: llvm-bugs at lists.llvm.org

I am attempting to use the safe-stack feature `-fsanitize=safe-stack` with
clang-11. I tested a simple hello world program in 32-bit compilation an Ubuntu
64 machine, however the program when run crashes with the error message

```
safestack CHECK failed:
/build/llvm-toolchain-11-11.0.0~++20200929060912+dda0a1867cc/compiler-rt/lib/safestack/safestack.cpp:95
MAP_FAILED != addr
Aborted (core dumped)
```

I wanted to check if SafeStack is indeed supported in 32-bit compilations?
 If so, any help debugging this would be very helpful. 

For completeness, here is the compilation command

```
clang-11 -m32 -g -O0 -fsanitize=safe-stack ./helloworld.c -o ./helloworld &&
./helloworld
```

And here is the program being compiled.

```
#include <stdio.h>

int main(int argc, char const *argv[])
{
    printf("Hello World\n");
    return 0;
}

```

-- 
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/20201215/de4a221b/attachment.html>


More information about the llvm-bugs mailing list