Menu

#260 sdcc - crash when compiling faulty code

None
closed-accepted
None
5
2016-01-05
2016-01-04
No

Hello SDCC team,

Here is a small crash i found. It happens when compiling the following:

void x(unsigned char *y)
{
  unsigned char a;
  y[0] = 2;

  return 1;
}

Flags: -mstm8 --debug --out-fmt-elf -c main.c -o main.rel

The reason is that the dwarf2 outputter cannot handle incomplete generated data.

The easy fix is to just not process the dwarf output if there is a fatal error. There is no need for it anyway as there are no output files when a fatal error occurs.

The patch adds a check for this fixing the problem.

Thanks,

/pedro

1 Attachments

Discussion

  • Peter Dons Tychsen

    Just for the record this is an ICE not a real crash if you where wondering... :-)

     
  • Philipp Klaus Krause

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

    • status: open --> closed-accepted
     

Log in to post a comment.