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

    <tr>
        <th>Summary</th>
        <td>
            [libunwind,v12.0.1] : unw_step() fails without this patch to set _unwindInfoMissing in UnwindCursor.hpp
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          JVD66
      </td>
    </tr>
</table>

<pre>
    Without the attached patch, which simply sets the cursor _unwindInfoMissing boolean to false
when valid info is found, to the source from 'libunwind-12.0.1-src.tar.xz' , 
all calls to unw_step() fail, even if valid unwind info was found, on any of the platforms:
  x86_64-redhat-linux (Fedora Core Linux 34), 
  aarch64-unknown-linux-android2{4,6,8,9}  , and arm-unknown-linux-androideabi2{4,6,8,9} .
 
Without the patch, calls to unw_step() ALWAYS return UNW_STEP_END (0).  
With the patch, the same code that expects UNW_STEP_SUCCESS values from unw_step() 
now gets them, and prints full stack traces.

[libunwind-12.0.1.patch.txt](https://github.com/llvm/llvm-project/files/8445121/libunwind-12.0.1.patch.txt)

It took me a long time to find and correct this bug !

Nothing in UnwindCursor.hpp was setting _unwindInfoMissing to false, when valid info was found !

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVU8Fu4jAQ_ZpwGREFJ0ByyIFCK3XVrVZiu9WekBM7xFtjR7YDdL9-xw6ltKKHFZCEeObNe_NmKs1ey2fhWt07cC0H6hytW86go65uI7KEQyvqFqzYdfIVLHc2xNW9sdrAplcHodi9avR3Ya1QW6i0lpwqcBoaKi2PklWULA4tV7CnUjAQGAzCQqN7xXwFjPSQVvem5tAYvYOIzKWoBvDxhMRJPBlbU8eOmvj4F0_BJw7QVEqo8WI9EKZsrONdRPKIFMhASB_J91heNCcGA-5A5EAvmGgFVL2CbgKhTlLXaLOzUboYSgEc89lmlo0NZy11YylUf0Qq-R1n2lBYasPhIbxMM6z_ThKAUlO3mNqrF6UPasgdU8WMFoxE8xtMWM7wh8SXRTRfQdCIAUDN7noap5W4mhqfqg63S4PPvn7VssXD8-L3Ggx3vVHw9Pi8Wf-8_bG5fVx5oQmGxHCB-xE0-Eh3OB-acfxHHfBjx2ucmjPS-mm5vF2vvRc9t4PfnzgM8KgXtqeB2731ojNC4aumR9ctzuoLOENrbk-KT9fpzefxiQPH2B1dNF1hmda5LhhL7vC7RSV9Fdca69xJuX-7jTuj_yB9_NsIyS3e8yybTsjEB3xdAq2_oHOPrdf6BbAvFKTGJXECn_2G-Dn0smptDNZBqbgZVb_FXk8uIR41nmCiQEtCzWVYwLjtujDCuJjOn19ZyPMihmX-uIbn6X-vN2Jlyoq0oCMnnOTlZS8RYj9oxSYCdu_avlk4nOcNxYSmeBJI8Rq9K4pGvZHlfxuEeH1waJrNi2LUliSbsaSgOc1ZlScVZUWRzklOCMuzIivqkaQVl9YrjAhR_AABAp9R3UiUJCEkyZL5BD9pGs-alDcJYSkj03lKeZQlfId6Y88j1mY7MmWghPZZPJTCOvt-SFHuVvHQUI9Pe2ySKb_9Ws1mo1C4DMT_AaSjzfw">