parent
3efdd7b2ad
commit
d8fa8b5455
|
@ -1,3 +0,0 @@
|
|||
* wasi behavior tests failing
|
||||
* go ahead and use allocSentinel now that the stage1 bug is fixed
|
||||
* audit the base cache hash
|
|
@ -231,8 +231,6 @@ fn AllocWithOptionsPayload(comptime Elem: type, comptime alignment: ?u29, compti
|
|||
/// call `free` when done.
|
||||
///
|
||||
/// For allocating a single item, see `create`.
|
||||
///
|
||||
/// Deprecated; use `allocWithOptions`.
|
||||
pub fn allocSentinel(
|
||||
self: *Allocator,
|
||||
comptime Elem: type,
|
||||
|
|
|
@ -1118,9 +1118,7 @@ fn linkWithLLD(self: *Coff, comp: *Compilation) !void {
|
|||
Compilation.dump_argv(argv.items);
|
||||
}
|
||||
|
||||
const new_argv_with_sentinel = try arena.alloc(?[*:0]const u8, argv.items.len + 1);
|
||||
new_argv_with_sentinel[argv.items.len] = null;
|
||||
const new_argv = new_argv_with_sentinel[0..argv.items.len :null];
|
||||
const new_argv = try arena.allocSentinel(?[*:0]const u8, argv.items.len, null);
|
||||
for (argv.items) |arg, i| {
|
||||
new_argv[i] = try arena.dupeZ(u8, arg);
|
||||
}
|
||||
|
|
|
@ -1589,10 +1589,7 @@ fn linkWithLLD(self: *Elf, comp: *Compilation) !void {
|
|||
}
|
||||
|
||||
// Oh, snapplesauce! We need null terminated argv.
|
||||
// TODO allocSentinel crashed stage1 so this is working around it.
|
||||
const new_argv_with_sentinel = try arena.alloc(?[*:0]const u8, argv.items.len + 1);
|
||||
new_argv_with_sentinel[argv.items.len] = null;
|
||||
const new_argv = new_argv_with_sentinel[0..argv.items.len: null];
|
||||
const new_argv = try arena.allocSentinel(?[*:0]const u8, argv.items.len, null);
|
||||
for (argv.items) |arg, i| {
|
||||
new_argv[i] = try arena.dupeZ(u8, arg);
|
||||
}
|
||||
|
|
|
@ -567,10 +567,7 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void {
|
|||
Compilation.dump_argv(argv.items);
|
||||
}
|
||||
|
||||
// TODO allocSentinel crashed stage1 so this is working around it.
|
||||
const new_argv_with_sentinel = try arena.alloc(?[*:0]const u8, argv.items.len + 1);
|
||||
new_argv_with_sentinel[argv.items.len] = null;
|
||||
const new_argv = new_argv_with_sentinel[0..argv.items.len :null];
|
||||
const new_argv = try arena.allocSentinel(?[*:0]const u8, argv.items.len, null);
|
||||
for (argv.items) |arg, i| {
|
||||
new_argv[i] = try arena.dupeZ(u8, arg);
|
||||
}
|
||||
|
|
|
@ -385,10 +385,7 @@ fn linkWithLLD(self: *Wasm, comp: *Compilation) !void {
|
|||
Compilation.dump_argv(argv.items);
|
||||
}
|
||||
|
||||
// TODO allocSentinel crashed stage1 so this is working around it.
|
||||
const new_argv_with_sentinel = try arena.alloc(?[*:0]const u8, argv.items.len + 1);
|
||||
new_argv_with_sentinel[argv.items.len] = null;
|
||||
const new_argv = new_argv_with_sentinel[0..argv.items.len :null];
|
||||
const new_argv = try arena.allocSentinel(?[*:0]const u8, argv.items.len, null);
|
||||
for (argv.items) |arg, i| {
|
||||
new_argv[i] = try arena.dupeZ(u8, arg);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue