-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QEMUv8: C++ exception test fails when TA is built with -pg (ftrace) #4022
Comments
After some investigation and reading the ftrace code again, the error is not surprising. The C++ runtime needs to unwind the stack to propagate exceptions. When doing so, it assumes a "standard" stack layout. When ftrace is enabled however, the stack is modified which is why the unwinder can't find an exception handler and aborts the program. The linux kernel ftrace uses a similar mechanism to intercept function returns, see this patch: [1] https://lore.kernel.org/patchwork/patch/709315/ which is part of a series that makes the unwinder ftrace-aware. Our unwinder in Unfortunately, modifying the C++ unwinder to make it ftrace-aware is impossible in our case. It seems our only option is to document that function tracing and C++ exception handling are incompatible, and skip the test 😢 |
@b49020 FYI and valuable comments 😉 |
Thanks @jforissier for the notification. I will try to look into this issue. |
os_test includes C++ exception tests which are incompatible with ftrace by design [1]. This commit makes sure the C++ tests are not compiled with the profiling flag (-pg), which is the flag that one would use to enable function tracing in TAs. Link: [1] OP-TEE/optee_os#4022 Signed-off-by: Jerome Forissier <[email protected]>
os_test includes C++ exception tests which are incompatible with ftrace by design [1]. This commit makes sure the C++ tests are not compiled with the profiling flag (-pg), which is the flag that one would use to enable function tracing in TAs. Link: [1] OP-TEE/optee_os#4022 Signed-off-by: Jerome Forissier <[email protected]> Acked-by: Jens Wiklander <[email protected]>
os_test includes C++ exception tests which are incompatible with ftrace by design [1]. This commit makes sure the C++ tests are not compiled with the profiling flag (-pg), which is the flag that one would use to enable function tracing in TAs. Link: [1] OP-TEE/optee_os#4022 Signed-off-by: Jerome Forissier <[email protected]> Acked-by: Jens Wiklander <[email protected]>
When OP-TEE is built with function tracing enabled and the TA is instrumented (
-pg
compiler flag), the C/C++ mixed frame exception test fails with anabort()
triggered by the C++ runtime.The text was updated successfully, but these errors were encountered: