mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 08:32:11 +01:00
Always zero-init pointery-typed vars on resume
This commit is contained in:
1 parent
a86023b290
commit
56c27ed3c3
3 files changed
+4
-2
No files matched your search
@@ -282,8 +282,7 @@ func (g *gen) writeResumeSuspend1(b *buffer, n *a.Var, suspend bool, initBoolTyp
|
||||
local := fmt.Sprintf("%s%s", vPrefix, n.Name().Str(g.tm))
|
||||
|
||||
if typ := n.XType(); typ.HasPointers() {
|
||||
// TODO: drop the initBoolTypedVars.
|
||||
if suspend || initBoolTypedVars {
|
||||
if suspend {
|
||||
return nil
|
||||
}
|
||||
rhs := ""
|
||||
|
||||
@@ -1839,6 +1839,7 @@ wuffs_deflate__status wuffs_deflate__decoder__decode(
|
||||
v_n_copied = self->private_impl.c_decode[0].v_n_copied;
|
||||
v_already_full = self->private_impl.c_decode[0].v_already_full;
|
||||
} else {
|
||||
v_written = ((wuffs_base__slice_u8){});
|
||||
}
|
||||
switch (coro_susp_point) {
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0;
|
||||
|
||||
@@ -2686,6 +2686,7 @@ static wuffs_gif__status wuffs_gif__decoder__decode_id(
|
||||
v_w = ((wuffs_base__io_writer){});
|
||||
v_z = self->private_impl.c_decode_id[0].v_z;
|
||||
} else {
|
||||
v_w = ((wuffs_base__io_writer){});
|
||||
}
|
||||
switch (coro_susp_point) {
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0;
|
||||
@@ -3029,6 +3030,7 @@ static wuffs_gif__status wuffs_gif__lzw_decoder__decode(
|
||||
v_expansion = ((wuffs_base__slice_u8){});
|
||||
v_n_copied = self->private_impl.c_decode[0].v_n_copied;
|
||||
} else {
|
||||
v_expansion = ((wuffs_base__slice_u8){});
|
||||
}
|
||||
switch (coro_susp_point) {
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0;
|
||||
|
||||
Reference in new issue
Block a user