| author | |
| committer | |
| log | 87d8cb19e4eed905b93d39554ea9a2a1012f6668 |
| tree | 31a205c59129b7308b20d0ad62a8b77cdb799d92 |
| parent | 6de0c622ff770628110208f5edeff54940cf5caa |
| signature |
The for-loop in dump() would index out of bounds if `t.index` is greater
than size, because `end` is the maximum of `t.index` and `size` rather than the
minimum.1 files changed, 1 insertions(+), 1 deletions(-)
lib/std/debug.zig+1-1| ... | ... | @@ -1999,7 +1999,7 @@ pub fn ConfigurableTrace(comptime size: usize, comptime stack_frame_count: usize |
| 1999 | 1999 | |
| 2000 | 2000 | const tty_config = detectTTYConfig(); |
| 2001 | 2001 | const stderr = io.getStdErr().writer(); |
| 2002 | const end = @maximum(t.index, size); | |
| 2002 | const end = @minimum(t.index, size); | |
| 2003 | 2003 | const debug_info = getSelfDebugInfo() catch |err| { |
| 2004 | 2004 | stderr.print( |
| 2005 | 2005 | "Unable to dump stack trace: Unable to open debug info: {s}\n", |