We are trying to use sprintf function in our code but are facing problems.

In certain cases, the program execution goes into Undefined Exception or Reserved Exception.

System Conditions:

Toolchain: GCC for Renesas RX

MCU: RX1115 – R5F51115ADFN

IDE: e2Studio v7.6.0

Library Settings:


The following code Executes properly without any issues. 

char A[50] = {};



The following code throws an Undefined Exception when executed

char A[50] = {};



The following code, when executed goes to the following non-existent address 

char A[50] = {};


Are we doing something wrong or is this a bug?


Any assistance will be really useful and greatly appreciated.


Thanks in Advance.


Superberti answered
    • Hi Vikram_FE, we’re looking into your issue and will reply as soon as we have an update.

    • Hello,

      Thank you for reaching out to us!

      Unfortunately, we were unable to reproduce the issue with a basic sample testcase.

      Could you please send us a sample project in which the issue is reproducible in order to investigate? We encourage you to please open a private support ticket where you could attach the project.

      Best regards,
      The GNU Tools Team