Another thing to verify would be how can a variable in a group have the offset 172, when
the group size is calculated to be 172 (probably something to do with `pragma`).
To check what's going on, I added another integer cfg variable to the last group. The
memory mapping this time (without using `pragma` blocks) is as follows:
```
START
block address: 0x7fde5c80fa08
vars address: 0x7fde5c80fa0c
Total allocated size: 1168
Group number: 1
Group location from start 20
Group size: 248
Group number: 2
Group location from start 284
Group size: 56
Group number: 3
Group location from start 356
Group size: 4
Group number: 4
Group location from start 380
Group size: 4
Group number: 5
Group location from start 404
Group size: 4
Group number: 6
Group location from start 428
Group size: 176
Group number: 7
Group location from start 620
Group size: 104
Group number: 8
Group location from start 740
Group size: 200
Group number: 9
Group location from start 956
Group size: 16
Group number: 10
Group location from start 988
Group size: 180
#For the new variable added
(gdb) print var->offset
$3 = 176
(gdb) print group
$4 = (cfg_group_t *) 0x7fdee1bca108
(gdb) print group->var_offset
$5 = 984
```
So, this time, the offset and group size make sense.
According to me, using `pragma` blocks would create more problems. The next thing to
investigate would be this inconsistency between group size and variable offset.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1583#issuecomment-403649773