-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Typemap: Set init to false after each individual destructor #14931
Conversation
4f65d45 to
befa2b6
Compare
|
Great catch!! |
rpcs3/util/fixed_typemap.hpp
Outdated
| @@ -299,21 +299,22 @@ namespace stx | |||
| } | |||
|
|
|||
| // Get actual number of created objects | |||
| u32 _max = 0; | |||
| std::vector<usz> types_to_destroy; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Althogh this is probably not needed, there must be another way to get the typeinfo index.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's wrong anyway, since it's the wrong order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably fixed now
ed71558 to
0b94b4a
Compare
0b94b4a to
a47b60b
Compare
| info->destroy(*--m_order); | ||
|
|
||
| // Set init to false. We don't want other fxo to use this fxo in their destructor. | ||
| m_init[type_index] = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do it in info->destroy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not the same object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, move this line to typeinfo::call_dtor. You can cast it there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a static function...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then pass it as argument or smth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And do it in auto_typemap.hpp too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry but I don't have the time to make this code even more spaghetti-like
a47b60b to
42e8559
Compare
Fixes crashes when fxo destructors call other fxo.