<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Safestack option crashes when used on 32-bit builds"
   href="https://bugs.llvm.org/show_bug.cgi?id=48510">48510</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Safestack option crashes when used on 32-bit builds
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>compiler-rt
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>11.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>compiler-rt
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>shravanrn@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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;
}

```</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>