TS: segfault/crash with --gen-object-api for array of enums
The following schema triggers a segmentation fault:
enum Color : byte { Red = 1, Green, Blue }
struct MyStruct {
xyz:[Color:1];
}
$ flatc --version
flatc version 24.3.25
$ flatc --ts --ts-no-import-ext --gen-object-api -o gen *.fbs
zsh: segmentation fault flatc --ts --ts-no-import-ext --gen-object-api -o gen *.fbs
This seems to occur because 0 is not a valid value for Color. If you change Red = 1, to Red = 0, or just Red, then the crash no longer occurs.
If you remove the --gen-object-api the crash no longer occurs.
This issue is stale because it has been open 6 months with no activity. Please comment or label not-stale, or this will be closed in 14 days.
Probably still relevant
This issue is stale because it has been open 6 months with no activity. Please comment or label not-stale, or this will be closed in 14 days.
Probably still relevant
This issue is stale because it has been open 6 months with no activity. Please comment or label not-stale, or this will be closed in 14 days.
Probably still relevant
@bjornharrtell (hope you don't mind me tagging you on so many issues :D )
@jtdavis777 that's ok :)
As for --gen-object-api I have little interest in it but I agree this would be good to fix.