Skip to content
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

Exception context lost while using dynamic exception-aware libraries #4

Open
jchapon opened this issue Jan 25, 2016 · 0 comments
Open

Comments

@jchapon
Copy link

jchapon commented Jan 25, 2016

Hello

I tried exceptions4c in an application with dynamic libraries like this:

program
 |_ lib1.so          (uses exception framework)
      |_lib2.so      (uses exception framework)

In my case, the context is lost between lib1 and lib2 even if the macro e4c_reusing_context is used.

The first tests were OK but with static libraries only.

I tested test_h08, edited to simulate my case, and here are the results in a static and dynamic way :
** static **

ext1:__ext1_the_context_WAS_NOT_ready
ext1:__ext1_before_REUSING_CONTEXT
ext1:__ext1_before_TRY_block
ext1:__ext1_before_CALL_FUNCTION_ext2
ext2:____ext2_the_context_WAS_ready
ext2:____ext2_before_REUSING_CONTEXT
ext2:before_CALL_FUNCTION_aux
aux:_____aux_no_exception_was_thrown
ext2:after_CALL_FUNCTION_aux
ext2:after_REUSING_CONTEXT_ext2
ext2:____ext2_the_context_IS_ready
ext2:____ext2_there_was_no_error
ext1:__ext1_after_CALL_FUNCTION_ext2
ext1:__ext1_inside_FINALLY_block
ext1:__ext1_after_TRY_block
ext1:__ext1_after_REUSING_CONTEXT
ext1:__ext1_the_context_IS_NOT_ready
ext1:__ext1_there_was_no_error
main:after_CALL_FUNCTION_ext1
main:result_was_0

** dynamic **

main:before_CALL_FUNCTION_ext1
ext1:__ext1_the_context_WAS_NOT_ready
ext1:__ext1_before_REUSING_CONTEXT
ext1:__ext1_before_TRY_block
ext1:__ext1_before_CALL_FUNCTION_ext2
ext2:____ext2_the_context_WAS_NOT_ready
ext2:____ext2_before_REUSING_CONTEXT
ext2:before_CALL_FUNCTION_aux
aux:_____aux_no_exception_was_thrown
ext2:after_CALL_FUNCTION_aux
ext2:after_REUSING_CONTEXT_ext2
ext2:____ext2_the_context_IS_NOT_ready
ext2:____ext2_there_was_no_error
ext1:__ext1_after_CALL_FUNCTION_ext2
ext1:__ext1_inside_FINALLY_block
ext1:__ext1_after_TRY_block
ext1:__ext1_after_REUSING_CONTEXT
ext1:__ext1_the_context_IS_NOT_ready
ext1:__ext1_there_was_no_error
main:after_CALL_FUNCTION_ext1
main:result_was_0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant