This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Bug report: acp6x segmentation fault



Found a bug in cl6x/acp6x leading to segmentation fault in acp6x. I have isolated the code producing the fault.

8206.seg_fault.zip

To reproduce - just execute

cl6x --gcc seg_fault.c

 

I have tested with C6000 Code Generation Tools 6.1.20 and with 7.0.1. Both had this bug.

 

Is there a short workaround?

  • I can reproduce the segmentation fault with versions 6.1.x and 7.0.x. With newer compiler versions (7.2.x and 7.3.x) there is a slightly different error but it does continue to generate a object file.

    >> INTERNAL ERROR: ILLEGAL INITIALIZATION

    This may be a serious problem.  Please contact customer support with a
    description of this problem and a sample of the source files that caused this
    INTERNAL ERROR message to appear.

    Note: May lose variable initialization information

    ... continuing compilation ...

    I will file a bug report against this and post the bug # here when done.

  • The bug tracking # for this issue is SDSCM00042344. If the compiler team finds a workaround after analysis, they will either post it here or update the bug record, which you can track using the SDOWP link in my signature.

  • The short workaround is to remove the nested designated initializer. Change:

    .param        = (struct module_1_params []){{.param1=1}}

    to

    .param        = (struct module_1_params []){{1}}

  • Thank you a lot. Removing the designated initializer helped me.