Hello SDCC team,
I accidentally found this crash. Its caused by calling the assembler with:
xxas -y main.asm
Because of the missing -o the -y is invalid but still tries to write to the file which crashes xxas.
Attached is an extra check for "oflag" that fixes it.
Please review/apply/reject
Thanks,
/pedro
I tried on cygwin64,
$ sdasstm8 -y main.asm
?ASxxxx-Error-<cannot open=""> : "main.asm"
removing
no crash happened.
Sorry i forgot to mention that it only crashes on win32/Debug which checks that the file handle is valid.
Also, it only crashes if you have a valid file, i.e. main.asm has to exist.
Please test if the issue if fixed in revision #9433. I added a check for ofp being nonzero in sdas/asxxsrc/asdbg.c.
Philipp
Yes, that rubustness check does the trick as well.
Close this and discard the patch.
Thanks,
/pedro