zchuango opened a new pull request, #3495: URL: https://github.com/apache/brpc/pull/3495
### What problem does this PR solve? Issue Number: resolve #2781 Problem Summary: When brpc is built with Clang on Linux x86_64, running `example/streaming_echo_c++` may crash. This PR preserves XMM6-XMM15 during Linux x86_64 bthread context switches and updates the corresponding context-frame layout. ### What is changed and the side effects? Changed: - Save and restore XMM6-XMM15 in `bthread_jump_fcontext`. - Expand the x86_64 context frame accordingly. - Update the MXCSR and x87 control-word offsets. - Keep `bthread_make_fcontext` consistent with the new frame layout. - Update the x86_64 register offsets used by `TaskTracer`. - Use unaligned SIMD loads/stores for the saved XMM state. Side effects: - Performance effects: - Breaking backward compatibility: ### Verification Verified on Linux x86_64 with Clang 18.1.3. After this change: - `streaming_echo_c++` starts and runs normally; - the client successfully creates the stream; - the server continuously receives streaming messages; - the stream is closed normally; - no core dump is observed. #### Environment <img width="596" height="274" alt="image" src="https://github.com/user-attachments/assets/75b7e468-1e7b-4ebf-9707-8d59768d50bf" /> #### Server <img width="631" height="274" alt="image" src="https://github.com/user-attachments/assets/8b4d073d-0c57-443a-84c0-b8f8058ba641" /> #### Client <img width="552" height="98" alt="image" src="https://github.com/user-attachments/assets/9925e95f-2e12-47bd-a589-821349d1588c" /> --- ### Check List: - Please make sure your changes are compilable. - When providing us with a new feature, it is best to add related tests. - Please follow [Contributor Covenant Code of Conduct](https://github.com/apache/brpc/blob/master/CODE_OF_CONDUCT.md). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
