-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
migration_notifier: get schema_ptr by value #15098
Conversation
To prevent use-after-free as seen in scylladb#15097 where a temp schema_ptr retrieved from a global_schema_ptr get destroyed when the notification function yielded. Capturing the schema_ptr on the coroutine frame is inexpensive since its a shared ptr and it makes sure that the schema remains valid throughput the coroutine life time. Fixes scylladb#15097 Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
It looks like the caller is losing the temporary arg since it uses a regular |
When did the regression start? |
Probably 825d617. |
Right. Previously the arg was captured by the async lambda before the function yielded |
CI state |
To prevent use-after-free as seen in scylladb#15097 where a temp schema_ptr retrieved from a global_schema_ptr get destroyed when the notification function yielded. Capturing the schema_ptr on the coroutine frame is inexpensive since its a shared ptr and it makes sure that the schema remains valid throughput the coroutine life time. Fixes scylladb#15097 Signed-off-by: Benny Halevy <bhalevy@scylladb.com> Closes scylladb#15098
To prevent use-after-free as seen in scylladb#15097 where a temp schema_ptr retrieved from a global_schema_ptr get destroyed when the notification function yielded. Capturing the schema_ptr on the coroutine frame is inexpensive since its a shared ptr and it makes sure that the schema remains valid throughput the coroutine life time. Fixes scylladb#15097 Signed-off-by: Benny Halevy <bhalevy@scylladb.com> Closes scylladb#15098
To prevent use-after-free as seen in scylladb#15097 where a temp schema_ptr retrieved from a global_schema_ptr get destroyed when the notification function yielded. Capturing the schema_ptr on the coroutine frame is inexpensive since its a shared ptr and it makes sure that the schema remains valid throughput the coroutine life time. \Fixes scylladb#15097 Signed-off-by: Benny Halevy <bhalevy@scylladb.com> \Closes scylladb#15098 (cherry picked from commit 0f54e24)
To prevent use-after-free as seen in
#15097
where a temp schema_ptr retrieved from a global_schema_ptr get destroyed when the notification function yielded.
Capturing the schema_ptr on the coroutine frame
is inexpensive since its a shared ptr and it makes sure that the schema remains valid throughput the coroutine life time.
Fixes #15097