3 ms·
What do you mean by "misbehaves badly when something panics"?
by ryao 2y ago
What do you mean by "misbehaves badly when something panics"?
- LegionMammal978 2y agoIf some unsafe code gets interrupted by a panic when it's in an intermediate state (before it can clean something up, or make two values consistent), then further operations on that state can result in UB. See https://github.com/becheran/grid/issues/19 https://github.com/becheran/grid/issues/19, https://gitlab.com/tspiteri/rug/-/issues/47 https://gitlab.com/tspiteri/rug/-/issues/47, and https://gitlab.com/tspiteri/rug/-/issues/49 https://gitlab.com/tspiteri/rug/-/issues/49 for a few of the less-contrived issues I've filed. It can also result in logic errors if objects are used after their methods panic, but such usage is generally not expected to work in the first place.