authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-10 18:54:24-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-10 18:54:24-04:00
logcd26d3b0bb2b32f1daf1d3d46bb53731dd54afec
treefa12591e49d082485f7e31a9df17daf37507c075
parent18f1fef1426cb0405c733890b2e1d8d48627e4fe
signaturelock-open Commit is signed but in an unrecognized format.

fix regressions caused earlier in this branch


2 files changed, 10 insertions(+), 4 deletions(-)

lib/std/debug.zig+9-2
...@@ -825,8 +825,15 @@ pub fn openElfDebugInfo(allocator: *mem.Allocator, elf_file_path: []const u8) !M...@@ -825,8 +825,15 @@ pub fn openElfDebugInfo(allocator: *mem.Allocator, elf_file_path: []const u8) !M
825825
826 const shoff = hdr.e_shoff;826 const shoff = hdr.e_shoff;
827 const str_section_off = shoff + @as(u64, hdr.e_shentsize) * @as(u64, hdr.e_shstrndx);827 const str_section_off = shoff + @as(u64, hdr.e_shentsize) * @as(u64, hdr.e_shstrndx);
828 const header_strings = mapped_mem[str_section_off..str_section_off + hdr.e_shentsize];828 const str_shdr = @ptrCast(
829 const shdrs = @ptrCast([*]const elf.Shdr, @alignCast(@alignOf(elf.Shdr), &mapped_mem[shoff]))[0..hdr.e_shnum];829 *const elf.Shdr,
830 @alignCast(@alignOf(elf.Shdr), &mapped_mem[str_section_off]),
831 );
832 const header_strings = mapped_mem[str_shdr.sh_offset .. str_shdr.sh_offset + str_shdr.sh_size];
833 const shdrs = @ptrCast(
834 [*]const elf.Shdr,
835 @alignCast(@alignOf(elf.Shdr), &mapped_mem[shoff]),
836 )[0..hdr.e_shnum];
830837
831 var opt_debug_info: ?[]const u8 = null;838 var opt_debug_info: ?[]const u8 = null;
832 var opt_debug_abbrev: ?[]const u8 = null;839 var opt_debug_abbrev: ?[]const u8 = null;
lib/std/io/fixed_buffer_stream.zig+1-2
...@@ -164,6 +164,5 @@ test "FixedBufferStream input" {...@@ -164,6 +164,5 @@ test "FixedBufferStream input" {
164 testing.expect(read == 3);164 testing.expect(read == 3);
165 testing.expect(mem.eql(u8, dest[0..3], bytes[4..7]));165 testing.expect(mem.eql(u8, dest[0..3], bytes[4..7]));
166166
167 read = try fbs.inStream().read(dest[0..4]);167 testing.expectError(error.EndOfStream, fbs.inStream().read(dest[0..4]));
168 testing.expect(read == 0);
169}168}