Skip to content

Commit

Permalink
Trap segmentation faults in map_handle::write() and report and no dis…
Browse files Browse the repository at this point in the history
…c space.
  • Loading branch information
ned14 committed Sep 24, 2021
1 parent a5e450e commit 8068cc3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/llfio/v2.0/detail/impl/posix/map_handle.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ map_handle::io_result<map_handle::const_buffers_type> map_handle::_do_write(io_r
byte *addr = _addr + reqs.offset;
size_type togo = reqs.offset < _length ? static_cast<size_type>(_length - reqs.offset) : 0;
if(QUICKCPPLIB_NAMESPACE::signal_guard::signal_guard(
QUICKCPPLIB_NAMESPACE::signal_guard::signalc_set::undefined_memory_access,
QUICKCPPLIB_NAMESPACE::signal_guard::signalc_set::undefined_memory_access | QUICKCPPLIB_NAMESPACE::signal_guard::signalc_set::segmentation_fault,
[&] {
for(size_t i = 0; i < reqs.buffers.size(); i++)
{
Expand Down
2 changes: 1 addition & 1 deletion include/llfio/v2.0/detail/impl/windows/map_handle.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ map_handle::io_result<map_handle::const_buffers_type> map_handle::_do_write(io_r
byte *addr = _addr + reqs.offset;
size_type togo = reqs.offset < _length ? static_cast<size_type>(_length - reqs.offset) : 0;
if(QUICKCPPLIB_NAMESPACE::signal_guard::signal_guard(
QUICKCPPLIB_NAMESPACE::signal_guard::signalc_set::undefined_memory_access,
QUICKCPPLIB_NAMESPACE::signal_guard::signalc_set::undefined_memory_access | QUICKCPPLIB_NAMESPACE::signal_guard::signalc_set::segmentation_fault,
[&] {
for(size_t i = 0; i < reqs.buffers.size(); i++)
{
Expand Down

0 comments on commit 8068cc3

Please sign in to comment.