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.

Compiler/TM4C129CNCZAD: ARM 18.12.3 linker now produces `error #10457-D: Use of variable-length arrays is not thread-safe.`

Part Number: TM4C129CNCZAD

Tool/software: TI C/C++ Compiler

18.12.2 does not produce this on our codebase, and as far as I know, we're not using any VLAs.  In looking at the changelog, CODEGEN-6289 references a fix for variable-length arrays.  Is it possible this broke something in the linker?

Also, it would be great if the linker actually gave us a clue as to where it was tripping up (with a symbol or something).  Right now, the only error it gives is:

`error #10457-D: Use of variable-length arrays is not thread-safe.`

  • You see this only when linking?  Do you build and link with --opt_level=4?

    Thanks and regards,

    -George

  • Yes, when linking.  This build doesn't use the optimizer at all.

  • I apologize for the delay.

    I am unable to reproduce this diagnostic ...

    Kaveh Vaghefi said:
    error #10457-D: Use of variable-length arrays is not thread-safe.

    Thus I am forced to ask you for the CCS project that produces this problem.  Please create the zip file as described in the article Sharing Projects, then attach that zip to the next post.

    Thanks and regards,

    -George

  • I can’t really do that.  You’re asking for me to post our entire project (and this codebase for the project) to a public forum.  Surely you can understand that is a non-starter.

    Can we try maybe a webex first?  Or is there a way to have the linker actually give us the name of the symbol it thinks is a VLA?  Is the linker in 18.12.2 also supposed to fail when it detects VLAs?

    I just ran PC Lint Plus against our entire codebase to check for rule 9035 (their check for variable length array usage which aligns with MISRA 18.8), and it found nothing.

  • Kaveh Vaghefi said:
    I can’t really do that.  You’re asking for me to post our entire project (and this codebase for the project) to a public forum.  Surely you can understand that is a non-starter.

    I understand.  Are you willing to send it just to me, by private message?  If so, hover your mouse over my screen name or avatar.  A box will pop up.  Click on Send a private message.  In the message compose interface which comes up, use the paper clip icon to attach the zip file.

    My guess is the linker is not just a little off, but way off.  I don't know how that happened.  That's why your test case is the only way I see to figure this out.

    Kaveh Vaghefi said:
    Can we try maybe a webex first?

    I realize it sounds a little mean to say this, but just watching it happen doesn't help.  I need a test case the development team can use to track this down.

    Thanks and regards,

    -George

  • George Mock said:

    Kaveh Vaghefi
    I can’t really do that.  You’re asking for me to post our entire project (and this codebase for the project) to a public forum.  Surely you can understand that is a non-starter.

    I understand.  Are you willing to send it just to me, by private message?  If so, hover your mouse over my screen name or avatar.  A box will pop up.  Click on Send a private message.  In the message compose interface which comes up, use the paper clip icon to attach the zip file.

    My guess is the linker is not just a little off, but way off.  I don't know how that happened.  That's why your test case is the only way I see to figure this out.

    No, I don't think I can send you this.  For one thing, it's not trivial to separate it out from the rest of our codebase, for another it's internal code that would require a lot of scrutiny to consider this sort of thing.

    George Mock said:
    Kaveh Vaghefi
    Can we try maybe a webex first?

    I realize it sounds a little mean to say this, but just watching it happen doesn't help.  I need a test case the development team can use to track this down.

    Thanks and regards,

    -George

    I've actually had great success in a webex/phone session with TI when debugging another problem.  It can be quite helpful to reduce the Q&A latency if we want to look at or try things but cannot share entire codebases.

  • Thank you for submitting a test case through other channels.  I can reproduce the problem.  I filed the entry CODEGEN-6655 in the SDOWP system to have this investigated.  You are welcome to follow it with the SDOWP link below in my signature.

    Thanks and regards,

    -George