Skip to content

fix backtraces produced by standard library under Wine #22484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/std/debug/SelfInfo.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ fn readCoffDebugInfo(allocator: Allocator, coff_obj: *coff.Coff) !Module {
di.dwarf = dwarf;
}

const raw_path = try coff_obj.getPdbPath() orelse return di;
const raw_path = (coff_obj.getPdbPath() catch return error.InvalidDebugInfo) orelse return di;
const path = blk: {
if (fs.path.isAbsolute(raw_path)) {
break :blk raw_path;
Expand Down
2 changes: 1 addition & 1 deletion lib/std/fs/Dir.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,7 @@ pub fn realpathW(self: Dir, pathname: []const u16, out_buffer: []u8) RealPathErr
defer w.CloseHandle(h_file);

var wide_buf: [w.PATH_MAX_WIDE]u16 = undefined;
const wide_slice = try w.GetFinalPathNameByHandle(h_file, .{}, &wide_buf);
const wide_slice = try w.GetFinalPathNameByHandle(h_file, .{ .volume_name = .Nt }, &wide_buf);
var big_out_buf: [fs.max_path_bytes]u8 = undefined;
const end_index = std.unicode.wtf16LeToWtf8(&big_out_buf, wide_slice);
if (end_index > out_buffer.len)
Expand Down
Loading