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

    <tr>
        <th>Summary</th>
        <td>
            asan_symbolize.py: SyntaxWarning reported by Python 3.12 re. invalid escape sequences
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          moha-gh
      </td>
    </tr>
</table>

<pre>
    When using `compiler-rt/lib/asan/scripts/asan_symbolize.py` with Python 3.12, two syntax warnings concerning invalid escape sequences are being reported:

```
[...]/asan_symbolize.py:319: SyntaxWarning: invalid escape sequence '\('
  match = re.match("^(.*) \(in (.*)\) \((.*:\d*)\)$", atos_line)
[...]/asan_symbolize.py:544: SyntaxWarning: invalid escape sequence '\('
  "^( *#([0-9]+) *)(0x[0-9a-f]+) *(?:in *.+)? *\((.*)\+(0x[0-9a-f]+)\)
```

This is caused by a change in behaviour in Python 3.12 to eventually make such things syntax errors (see [release notes](https://docs.python.org/3/whatsnew/3.12.html#other-language-changes)).

I'd be happy to file a PR to fix this, but I'm not sure how the regexes are supposed to look / why the invalid escape sequences have been added in the first place.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVN-P4yYQ_mvwyyjIBntjP_gh2dRS305tpXs8YTwx9DC4gJNN__oKkr3brXalSpUih_kBfPPxzYgQ9GwRe9IcSXMqxBaV8_3ilNjNqhjddOu_KrSwBW1nIE-ldMuqDfqdj4QNRo-EDSIIS9gQpNdrDA_Ht3BbRmf030jXG3kq4aqjgi-3qJwFTitG2DPEq4Nws1G8wFV4q-0cQDorMa9B24swegIMUqwIAf_a0EoMIDzCiCnF4-p8xInwAylPpHz9PpWP391sjpRS0pw-BMcPvOoIP8DvGcrXO5Lk-AQAELYnzTNhbVrkGwAWEaUCwk_gkWYjxxlpfiGspYQdCOvgvk1b-OnLrtfIq5sfSPM8vU0grE6nsWcQ0YVvRltM3v9UX1PX_7u-H6VARsVTtDmWuy5fe8wl3OGytny5h8Tu_K9oS_hA-CETcKD3COFDDr4j4FH28ZPTHpx8-Nj5-4fSAXQAKbaAE4w3ECCVsDOCtjCiEhftNp-MN6KE6AAvaOMmjLnBIr4jhE0qiCqL8yFW9N75kN4wIAJpjh4NioBgXcSQQbYqxjWkd2QDYcPkZKBrvog6PxM2cMKGqxIxWLwmk1aMqrgYwriLCv3OCDtvYsbdHXbI1Hb0bZG_ErafYERQYl1vCfxZGwQBX367Gy8JeEiiGbcIKX1JGCFsHkG5K0SF4HHGl0dXhW1dXSIsOjDOfQfCBriqW078tB-VuKSGRAtimnBKpKb8s_YhwmqERFpMPZ863okC-2rPymrfPe3bQvVjW5VNXe2R8bYR7OlctvtmrAVK3pRVVxe6ZyWry33ZVFVdVS3tZDUJyZvq3E44niWpS1yENtSYy5LYLXQIG_bdvq2awogRTcgTjjGLV8jBrOZT4fu0ZzducyB1aXSI4ecpUUeD_Uf99L6TfgyhpLK3YvJIP-Ws2Lzp32tk1lFtI5VuSaPVXF7_dqt3f6JMAzdjTyP2XtulZ_8EAAD__wdUwh0">