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
If the call to mmap_existing_shm() fails/throws and revalidate() returns early, the struct is left in an inconsistent state (shm_ptr probably points to inaccessible memory; shm_fd is open, but apparently fails checks in mmap_existing_shm()).
To mitigate this, the two functions should update the members only when all checks were successful.
In this section:
https://github.com/jellysheep/structstore/blob/e118e694314b5face75181ff6d6ea0bd11719687/src/structstore_shared.hpp#L207-L231
If the call to
mmap_existing_shm()
fails/throws andrevalidate()
returns early, the struct is left in an inconsistent state (shm_ptr
probably points to inaccessible memory;shm_fd
is open, but apparently fails checks inmmap_existing_shm()
).To mitigate this, the two functions should update the members only when all checks were successful.
cc @joruof
The text was updated successfully, but these errors were encountered: