Given that the program produces a segmentation error, I think the problem is most likely that the structure indicated (indicated) by expr->desc.constant was reused because the space was allocated, or perhaps the space never was not really allocated to everything.
The code shows various expired sins, such as using sprintf() instead of snprintf() and free allocation of 200 bytes for a string representation of a floating point number. (You are unlikely to need so much space, and if you do, you will most likely need to have at least 100 more digits than yours, since the range of exponential floating point numbers is usually +/- 308, and the only reason which you'd need 200 characters to allow incredibly large or incredibly small numbers.)
You showed that $$->desc.constant points to the same place, but you did not specify how this space is allocated. Then you allocate the string space in $$->desc.constant->base.id without highlighting the space for base .
source share