Page MenuHomePhabricator

Fixes for T5234.
ClosedPublic

Authored by iscaro on Aug 2 2017, 1:29 PM.

Details

Summary

Commit one - Eina_File: Avoid using munmap() on file->global_map.

When a virtualized file is created the file->global_map will not
point to a mmapped region, thus it's not safe to use munmap() during
the file cleanup. Only use munmap() if the file is backed by a FD.

Commit two - Efl_Copier: Add efl_wref_del() for pd->job.

In order to perform IO operations the copier will create futures using
efl_future_use(&pd->job, ...), which will set pd->job to NULL once the
future is destroyed. However this may lead to problems, because in some
cases the copier may be deleted at the _efl_io_copier_job() function,
which is the future's callback. Since the copier may be deleted before
the future, the area pointed by pd->job will have disappeared by the time the future
tries to set pd->job to NULL. To avoid this problem the copier must
explicily call efl_wref_del().

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
iscaro created this revision.Aug 2 2017, 1:29 PM

This fix is available at my branch: devs/iscaro/copier_file

barbieri accepted this revision.Aug 2 2017, 1:47 PM

looks good to me

This revision is now accepted and ready to land.Aug 2 2017, 1:47 PM
cedric accepted this revision.Aug 2 2017, 4:03 PM

Looks good to me. Will push.

This revision was automatically updated to reflect the committed changes.