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

    <tr>
        <th>Summary</th>
        <td>
             Error in the copyfmt function of cout and cerr
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          W-50243
      </td>
    </tr>
</table>

<pre>
    Some errors occur when I run the following program:

>  cout.copyfmt(cerr);
    cout<<1<<endl;

It failed and output `Segmentation fault` on llvm15, but it works successfully on llvm 14.  [https://godbolt.org/z/qEn15bq9Y](https://godbolt.org/z/qEn15bq9Y). The copyfmt function does not change from llvm14 to llvm15. Did cout and cerr change? Or has something else changed?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMkruO3DwMhZ-Gbog1bPo2LlzsXAxs9Rf7A0FKW6JtJbI0q0sGm6cP7JlNkKRJIxb8RBwensF7NRvmDqojVOdkiGGxrvv0VGVUFslo5Xv3aldGds46j1aI6PC2sMEXdNFgWBgnq7W9KTPj1dnZDStcejieoH2G7AzZx1tcEIWNIRX2-j6tAegg2DmgForjnUG8I1CcoDjl98JG6p_E_X0JOA1Ks8TBSLQxXGNAqLNXnlc2YQjKGpyGqAPUGVqDWn9b8wrohGMMqALerPvq0Uch2Pspav3-gWFepohQHZcQrh6KZ6AeqJ-tHK0OqXUzUP8dqH-7mLwa39rPUJ2BDv-OU5vi_wvjwwecohG7YmnZo7EBxTKYmXFydr1LLzHYxxIpnpXcXdqX3yx88FD0-J_DZfDo7cph2U7C2vOjL6HoE9kVsi3aIeEubzKipqKqTpaOp8N0aBopSI4jNeOUl207ykJWddHU9ZCojjIqcsrzrM7LvE5lK8qSx5bzfGzrtoQy43VQOt10bosnyvvIXVNlVCV6GFn7PWdEhm-4N4Foi53rtj9PY5w9lJlWPvhfU4IKmju8bAlEdY_cX9bZ6XdLkuh098dJVFjimAq7AvXb9Ed5ujr7hUUA6ndNHqjfNf8IAAD__z22_rw">