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 回答済