diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2014-01-28 12:19:17 +1100 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2014-01-28 12:19:17 +1100 |
| commit | 2e24adf52182b6162e42fed5ec004e73bbefa213 (patch) | |
| tree | fe1863611e2adb20d97565e05e941a8f5448e9e7 | |
| parent | 4176343073d0b28380b478fea941913567ebdd5c (diff) | |
| download | rust-2e24adf52182b6162e42fed5ec004e73bbefa213.tar.gz rust-2e24adf52182b6162e42fed5ec004e73bbefa213.zip | |
std: comment about OOM & allocs in begin_unwind_fmt.
Follow-up to #11841 which added this function.
| -rw-r--r-- | src/libstd/rt/unwind.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/rt/unwind.rs b/src/libstd/rt/unwind.rs index 25a92148e96..88c6b52ec23 100644 --- a/src/libstd/rt/unwind.rs +++ b/src/libstd/rt/unwind.rs @@ -391,6 +391,10 @@ pub fn begin_unwind_raw(msg: *u8, file: *u8, line: uint) -> ! { /// the actual formatting into this shared place. #[inline(never)] #[cold] pub fn begin_unwind_fmt(msg: &fmt::Arguments, file: &'static str, line: uint) -> ! { + // We do two allocations here, unfortunately. But (a) they're + // required with the current scheme, and (b) we don't handle + // failure + OOM properly anyway (see comment in begin_unwind + // below). begin_unwind_inner(~fmt::format(msg), file, line) } |
