DBNMSrPaintPlane() where if "tile" is non-NULL then "plane" can be
NULL; the hint tile does not get set but the routine can be called
without knowing the plane other than that the tile is in it somewhere.
cast as "bool", causing issues with the proper/strict use of
the "bool" type. Changed the version back so that it will
update the github mirror tonight, since the current version
appears to be working.
The comment indicates the expectation that TiFree() is deferred-by-one,
which would be true if freeMalloc() was used but since the custom mmap()
allocator technically this is not true.
The TiFree() allocator is single-threaded and separate from libc so the
assumption is still kind of true but for different reasons
(single-threaded).
But since it doesn't really cost anything (other than a few lines of
code a human needs to read) the compiler would be expected to perform a
load (which it was going to do anyway) into a caller-saves register over
the function call.
Most of the other function state is invalidated anyway due to the heavy
linked-list navigation and low number of local variables, I would not
think there is much register allocation pressure.
TODO this code can be tested by confirming zero allocations are active
and by invalidating (poison) all fields inside TiFree().
Fix code scanning alert no. 30: Multiplication result converted to larger type (#55)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
related to that cell (since elements are usually temporary and so
kept in a separate list, not in the cell). Corrected a major error
in the bplane implementation that failed to remove a cell use from
the child def's parent list when deleting the use. Can cause magic
to go into an infinite loop, especially after selecting and unselecting
cells.
called the undo record generation twice when transforming (move,
copy, etc.) cell instances. This would cause the "undo" command
to regenerate the old instance position in the bplane records,
generally causing trouble down the road (did not encounter any
fatal errors, but it can't be good).