Menu

#2443 SMT8 - crash in DWARF generator for empty main

closed-fixed
Ben Shi
None
STM8
5
2015-12-26
2015-12-22
No

Hello SDCC team,

Version: SVN trunk

There is a crash in the DWARF generator when using an empty main() like this:

main.c:

int main(void)
{
   return 0;
}

The DWARF generator crashes when the following is called:

sdcc -mstm8 -c main.c

The reason is that in "dwWriteEndFunction()" "dwFuncTag" is null because "dwWriteFunction()" is never called for "main".

I think "dwWriteFunction()" should have been called for "main", but i have not looked into how/where to change this.

Thanks,

/pedro

Discussion

  • Peter Dons Tychsen

    Ah sorry, the options are of course: sdcc --debug --out-fmt-elf -mstm8 -c main.c

     
  • Ben Shi

    Ben Shi - 2015-12-26
    • status: open --> closed-fixed
    • assigned_to: Ben Shi
     
  • Ben Shi

    Ben Shi - 2015-12-26

    Fixed in reversion #9429.

     

Log in to post a comment.