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

    <tr>
        <th>Summary</th>
        <td>
            leak sanitizer should support optional function `__lsan_default_options` like ubsan and asan
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    During startup, both the address sanitizer and the undefined behavior sanitizer look for a function `____asan_default_options` and `__ubsan_default_options`, respectively, and if it exists call it and process the returned string like the environment variable `ASAN_OPTIONS` / `UBSAN_OPTIONS` (afterwards they process these environment variables).

The leak sanitizer currently only supports the environment variable `LSAN_OPTIONS`, but no similar function `__lsan_default_options`. It would be nice if it did, because then it would be possible to configure it via code, too.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMU8Fu2zAM_Rr5IjRQ5DpxDj6kKwIUG9oB7c6BbNExV0UyRCpd9vWD1G7rumLYxYbIR_HxPcoQ4cEDdKK5Es11ZRJPIXYfIxKjh-Vm3VR9sOfuOkX0B0lsIqdZ6A-yDzxJnkAaayMQSTIeGb9DlMbbkknewogerOxhMicM8RXIhfAoxxClkWPyA2PwUqzUfr_fGzJ-b2E0yfE-zDlFYqXKvQWS-vcRmVcEmmFgPIE753MuwlEiS_iGxCQH41w-5sQcw5C5Z7YROMVMlrjM6vARSgL8CWPwR_AsTyai6R1kHtv77e3-7vPDzd3tfaYn9C6Hv1z9FW_NyBCfTLSl1fl1X3q_AQm9WQh1LdT2-fswgXRgHl9JOKQYwbM7y-DdWVKa5xCZ_kn605_kipOJpQ-S8IjOxDduuPeVXsgblk8hueyt9DjAi8gWbbkTBpOo6Odz-Bd0DkSYuXCQQ_AjHlKEjDihkUOwkKs5hEVlu9pu6o2poFuu1o1aN0tVV1NnbaM2LTSXQ62N0apt7WYzjhqW0Ov1SlXYaaVrtazVUtWtrhemWbfrBoxq-1qPq5W4VHA06BbOnY6LEA8VEiXoVqpul5UzPTj6-SJil0EXfTqQuFQub9DvMkZ20L1xhaYy64sb8lkz4_5P1-etK_tdFjQ_hSpF103MM4l6K_RO6N0BeUr9YghHoXeZzsvvYo7hKwws9K6MRELvylQ_AgAA__9nEVed">