You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.
In some cases, when we have complex object which holds several other objects (which allocate some memory) we can end up calling tx_free() inside of aborted transaction which will crash the application.
For example, if inside of a constructor of top level object we are constructing it's sub elements and construction of nth sub element fails (for example, because of out-of-memory), destructors of all already constructed objects will be called. If inside of those destructors we call free, application will crash.
This problem occurs for example inside segment_vector.
Solution
One solution would be to use no_abort flag for transactions. An abort would be done only in the outermost level. Inner transactions would not abort - only propagate appropriate exceptions.
The text was updated successfully, but these errors were encountered:
Problem
In some cases, when we have complex object which holds several other objects (which allocate some memory) we can end up calling tx_free() inside of aborted transaction which will crash the application.
For example, if inside of a constructor of top level object we are constructing it's sub elements and construction of nth sub element fails (for example, because of out-of-memory), destructors of all already constructed objects will be called. If inside of those destructors we call free, application will crash.
This problem occurs for example inside segment_vector.
Solution
One solution would be to use no_abort flag for transactions. An abort would be done only in the outermost level. Inner transactions would not abort - only propagate appropriate exceptions.
The text was updated successfully, but these errors were encountered: