mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-26 01:01:35 +01:00
Zero-initialize bool-typed coro local variables
Updates https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6470
This commit is contained in:
1 parent
fbdc648b1a
commit
11ad47af86
5 files changed
+57
-7
No files matched your search
@@ -229,7 +229,11 @@ func (g *gen) writeFuncImplBodyResume(b *buffer) error {
|
||||
b.printf("uint32_t coro_susp_point = self->private_impl.%s%s[0].coro_susp_point;\n",
|
||||
cPrefix, g.currFunk.astFunc.FuncName().Str(g.tm))
|
||||
b.printf("if (coro_susp_point) {\n")
|
||||
if err := g.writeResumeSuspend(b, g.currFunk.astFunc.Body(), false); err != nil {
|
||||
if err := g.writeResumeSuspend(b, g.currFunk.astFunc.Body(), false, false); err != nil {
|
||||
return err
|
||||
}
|
||||
b.writes("} else {\n")
|
||||
if err := g.writeResumeSuspend(b, g.currFunk.astFunc.Body(), false, true); err != nil {
|
||||
return err
|
||||
}
|
||||
b.writes("}\n")
|
||||
@@ -267,7 +271,7 @@ func (g *gen) writeFuncImplBodySuspend(b *buffer) error {
|
||||
|
||||
b.printf("self->private_impl.%s%s[0].coro_susp_point = coro_susp_point;\n",
|
||||
cPrefix, g.currFunk.astFunc.FuncName().Str(g.tm))
|
||||
if err := g.writeResumeSuspend(b, g.currFunk.astFunc.Body(), true); err != nil {
|
||||
if err := g.writeResumeSuspend(b, g.currFunk.astFunc.Body(), true, false); err != nil {
|
||||
return err
|
||||
}
|
||||
b.writes("\n")
|
||||
|
||||
Reference in new issue
Block a user