Menu

#1246 Fix crash when indexed part select has zero width

v0.9-branch
closed-accepted
nobody
5
2012-07-28
2012-07-26
No

The compiler doesn't currently check that the width of an indexed part select is non-zero. If code contains this erroneous case, the compiler can crash (with an assertion failure). This patch causes the compiler to output a suitable error message and recover. It also fixes a potential crash if an illegal expresson is encountered.

This patch can be applied to both devel and v0.9.

I'm also attaching a patch which stops the compiler generating duplicate error messages for this condition. This second patch is for devel only.

Also attached is a regression test for the test suite. This test should produce a compile error.

Discussion

  • Martin Whitaker

    Martin Whitaker - 2012-07-26

    Regression test for test suite

     
  • Stephen Williams

    Applied to git master.

     
  • Stephen Williams

    • milestone: 530241 --> v0.9-branch
    • status: open --> open-accepted
     
  • Stephen Williams

    Applied to git v0_9-branch.

     
  • Stephen Williams

    • status: open-accepted --> closed-accepted
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.