- reallocarray/recallocarray
- freezero
Diff Detail
Event Timeline
Nice, thanks.
lib/StaticAnalyzer/Checkers/MallocChecker.cpp | ||
---|---|---|
704–710 | These lists are getting long, i guess they should be refactored into a simple II -> Kind pointer map lookup eventually. | |
923–928 | The moved array is not all zeros, just the new part, right? It should be more accurate to realloc() here. Not sure if we actually model realloc() by moving memory contents (at least, i'm sure we're not modeling it perfectly). If we simply invalidate the newly allocated region, it should be fine to simply re-use ReallocMemAux() here. If we try to mark the newly added bytes as uninitialized, then you might need to pass a flag to zero-initialize them instead. |
Hi David. While I did make some superficial changes here recently, I'm no authority on what belongs here. However, I would suggest that the refactoring patch be split from the original patch. Thanks.
True you re right. And should rename it once I got back to it my initial plan was with more functions but finally ended up with those OpenBSD specifics.
These lists are getting long, i guess they should be refactored into a simple II -> Kind pointer map lookup eventually.