[vkgen] Fix parsing of actual bool types

Switching to native ruamoko bool for vkgen resulted in bool getting
incorrectly parsed as a string (which mean getting the string's address
written to the value). Fixes the randomly enabled debug pipelines (and
probably a few randomly disabled normal pipelines, though less likely as
they're usually implicitly initialized). The one bit of actual legit UB
(ie, that which wasn't immediately mitigated one way or another) found
by ubsan, and it was a data error.
This commit is contained in:
Bill Currie 2024-09-24 11:09:10 +09:00
parent 23e2fff44a
commit 5a928581ab
3 changed files with 13 additions and 2 deletions

View file

@ -19,4 +19,15 @@
{
return "QFString";
}
-(string) parseFunc
{
return "parse_enum";
}
-(string) parseData
{
return "&cexpr_bool_enum";
}
@end

View file

@ -200,7 +200,7 @@ skip_value(string name)
{
fprintf (output_file, "\tHash_DelTable (%s_symtab.tab);\n",
[self name]);
fprintf (output_file, "\t%s_symtab.tab = 0;\n", [self name]);
fprintf (output_file, "\t%s_symtab.tab = nullptr;\n", [self name]);
}
-(void) writeSymtabEntry

View file

@ -532,7 +532,7 @@ write_table (Struct *self, PLItem *field_dict, Array *field_defs,
fprintf (output_file, "\tHash_DelTable (%s_symtab.tab);\n",
[self outname]);
fprintf (output_file, "\t%s_symtab.tab = 0;\n", [self outname]);
fprintf (output_file, "\t%s_symtab.tab = nullptr;\n", [self outname]);
}
-(void) writeSymtabEntry