Menu

#254 as - crash due to invalid option combination

None
closed-out-of-date
None
5
2015-12-30
2015-12-28
No

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

1 Attachments

Discussion

  • Ben Shi

    Ben Shi - 2015-12-28

    I tried on cygwin64,

    $ sdasstm8 -y main.asm
    ?ASxxxx-Error-<cannot open=""> : "main.asm"
    removing

    no crash happened.

     
  • Peter Dons Tychsen

    Sorry i forgot to mention that it only crashes on win32/Debug which checks that the file handle is valid.

     
  • Peter Dons Tychsen

    Also, it only crashes if you have a valid file, i.e. main.asm has to exist.

     
  • Philipp Klaus Krause

    • assigned_to: Philipp Klaus Krause
    • Group: -->
     
  • Philipp Klaus Krause

    Please test if the issue if fixed in revision #9433. I added a check for ofp being nonzero in sdas/asxxsrc/asdbg.c.

    Philipp

     
  • Peter Dons Tychsen

    Yes, that rubustness check does the trick as well.

    Close this and discard the patch.

    Thanks,

    /pedro

     
  • Philipp Klaus Krause

    • status: open --> closed-out-of-date
     

Log in to post a comment.