diff options
| author | bors <bors@rust-lang.org> | 2015-05-07 15:25:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-05-07 15:25:09 +0000 |
| commit | a39d4fc68472ed7a512a7de93f422d7697d92e06 (patch) | |
| tree | fa4c4c0162d793699b5bae9bf7f8dc4ee5eafd40 /src/libstd/sys | |
| parent | 05d5fcaa5ba0c385e1dc97037c89fae437634fc3 (diff) | |
| parent | 939e4c9ea9e63b4da1033d66a72a044279036e6f (diff) | |
| download | rust-a39d4fc68472ed7a512a7de93f422d7697d92e06.tar.gz rust-a39d4fc68472ed7a512a7de93f422d7697d92e06.zip | |
Auto merge of #25013 - pnkfelix:span_to_lines-oflo, r=huonw
Guard against overflow in `codemap::span_to_lines`. (Revised/expanded version of PR #24976) Make `span_to_lines` to return a `Result`. In `diagnostic`, catch `Err` from `span_to_lines` and print `"(unprintable span)"` instead. ---- There a number of recent issues that report the bug here. See e.g. #24761 and #24954. This change *might* fix them. However, that is *not* its main goal. The main goals are: 1. Make it possible for callers to recover from an error here, and 2. Insert a more conservative check, in that we are also checking that the files match up. ---- As a drive-by, fix #24997 , which was causing my attempts to `make check-stage1` on an `--enable-debug` build to fail.
Diffstat (limited to 'src/libstd/sys')
0 files changed, 0 insertions, 0 deletions
