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

Constructor / Destructor Prologue / Epilogue for Stack Exception Handling #15

Closed
P-p-H-d opened this issue Mar 13, 2018 · 0 comments
Closed
Labels
enhancement MOVED Moved to ISSUES.org

Comments

@P-p-H-d
Copy link
Owner

P-p-H-d commented Mar 13, 2018

Constructor (and destructor) need to use user-defined prologue / epilogue.
This is in order to register the constructed object into a proper Stack Exception Handling so that exceptions throwing may work reliably.

Proposal:
M_CONSTRUCTOR_PROLOGUE(object, oplist);
M_CONSTRUCTOR_EPILOGUE(object, oplist);
M_DESTRUCTOR_PROLOGUE(object, oplist);
M_DESTRUCTOR_EPILOGUE(object, oplist);

Object creation will need to add all sub-objects into the stack, then unstack all to push instead the root object (which will recursively remove them).

See also http://freetype.sourceforge.net/david/reliable-c.html#cseh

@P-p-H-d P-p-H-d added the MOVED Moved to ISSUES.org label Jul 20, 2018
@P-p-H-d P-p-H-d closed this as completed Jul 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement MOVED Moved to ISSUES.org
Projects
None yet
Development

No branches or pull requests

1 participant