<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/80497>80497</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            libasan: prctl interceptor uses wrong type for calling prctl implementation
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          fweimer-rh
      </td>
    </tr>
</table>

<pre>
    The `prctl` function in glibc is variadic, yet libasan calls it with a fixed argument list. This causes stack corruption on powerpc64le-linux-gnu with glibc 2.32 or later because the `prctl` implementation assumes that the parameter save area has been set up by the caller, which only happens on variadic calls.

References:

* [Bug 29770](https://sourceware.org/bugzilla/show_bug.cgi?id=29770) - prctl does not match manual page ABI on powerpc64le-linux-gnu
* [Bug 113728](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113728) - libasan uses incorrect prctl prototype

I don't know if I can get the ABI change reverted on the glibc side.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMUz2P6zYQ_DVUs7BAU7ZlFSp8ORi4Nnh9sKJWJPMoUuCH9ZxfH1DyIS-XBEhjFzuanRnOYoxGOaKend_Y-b3CnLQP_bSSmSkcgq4GPz77b5qAXfgSZLLswmHKTibjHRgHyppBgonwwGBwNJKJX-BJCawZMKIDidZGMAlWkzQgTOYHjYBB5ZlcgcVUwzdtIkjMkSLEhPI7SB9CXrYt3sHiVwqLvJwsHaxx-cdBubwz7gJE3QjwASwmCjDQxgXpi3AzL5bKWtyIMcY8U4SkMW3YBQPOVBgiPggwEILGCAORg0gJ8gLDc4MWWxSK2VUbqcE7-wSNy0IuFsWfcez-a8bfGb_tv7_SRIGcpMia288DJm7Azm9vWYHo2paz8zsTV53SsiHFnYl79DlIWjFQ7YNi4j5k9YexFstM-_W3IataKsOauxlZ874TiQ4OsMUAo6cIzieYMUkNM7qMFhZUBLe3j_8M-x8Kj8emFdd_k6ikrJXL_0_fi2YT-FmZrQbGlQqQTC_dS_DJp-dCPyf2AaN3TLQJvju_gpngAyQ6ULQ_aHEkNTpFEOhBIdFYHJbR3ptoRqqrsW_Grumwov7Y8kvHu2vHK90PU3ttG7wIxHPbirFrr81A12GSdBpPR16ZXnBx4oILcWyuR17Lhk9iak9iwk42w4WdOM1obG3tYy6JVCbGTP2Vn7q2sjiQjdv1CeFohW3IhCjHGPryzWHIKrITL3cS_2JJJlnqX4Gx5vYKybhEQdKSfNhTXIN3CkpsMPmwldE49Yn-2zlUOdj-y0uapPNQSz8zcS-7X3-HJfjfSSYm7pviyMR9c_RnAAAA__8vTm5E">