It is quite possible that there are a few other fields still missing since we currently do not yet have automated testing of struct field existence.
Fixes#747.
PiperOrigin-RevId: 517189048
Change-Id: I7c1d95e700eaea05aaa3cde1fd05e1a259553117
- Add private function `mj_arenaAlloc`. This is used internally to allocate memory from the arena.
- Add private function `mj_nefc` to count constraints. This function returns a tight upper bound on `d->nefc`. The number of counted constraints can be slightly bigger than exact `d->nefc` in the case of constraints with empty Jacobian, as when placing a frictional tendon between two world sites.
- Add new `memory` attribute to the `size` XML element for specification of arena memory size. This attribute is mutually exclusive with `nstack` and `njmax` specifications, which are now deprecated (but left around for the time being for legacy compatibility).
- Move `d->stack` to the end of the new arena space. The stack now grows in reverse from the end.
PiperOrigin-RevId: 479341539
Change-Id: Ie019c202e0908577ffc6f833a37920858116f667
List all valid names in the error message.
Fix an off-by-one error when accessing elements by numeric index (rather than name).
PiperOrigin-RevId: 457702283
Change-Id: I6e4f1518b4ecd9ca91ac9b0bf6b0963fc0a9bd18
Indiscriminate memset into d->buffer and m->buffer previously caused msan to not detect uninitialized reads.
Also fix tests with uninitialized read bugs that are detected by msan after this change.
PiperOrigin-RevId: 451508224
Change-Id: I1f4b080a8ef765c34ba7a0adc2c686419f6e5516