decNumber.h:
typedef struct {
int32_t digits; /* Count of digits in the coefficient; >0 */
int32_t exponent; /* Unadjusted exponent, unbiased, in */
/* range: -1999999997 through 999999999 */
uint8_t bits; /* Indicator bits (see above) */
/* Coefficient, from least significant unit */
decNumberUnit lsu[DECNUMUNITS]; // decNumberUnit is int16_t and DECNUMUNITS is 1
} decNumber;
Test.cpp:
decNumber a,b,c;
When I print the addresses of a,b and c, this is what I get:
a:0x7fff0d7a9858 to 0x7fff0d7a9864
b:0x7fff0d7a9864 to 0x7fff0d7a9870
c:0x7fff0d7a987c to 0x7fff0d7a9888
Is the byte overlap of 0x7fff0d7a9864 between a and b valid? This program eventually runs into a segmentation fault. Why?
Any help is greatly appreciated!