This continues the push away from hard-coded knowledge about functions
towards attributes. We'll use this to annotate free(), realloc() and
cousins and obviate the hard-coded list of free functions.
Details
Details
- Reviewers
jyknight nikic - Commits
- rGa907d36cfe80: Attributes: add a new `allocptr` attribute
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
By the way, in which revision is this actually used? Do you plan to change the isRealloc/isFree APIs to check a specific operand of the call, rather than just the call?
Comment Actions
Yeah, eventually the (remaining) callers of isFree need to check for the annotated operand rather than just blindly grabbing the first one (as an example). Mercifully all free/realloc functions today are similar-enough that the hard coded argument number works today, but this is futureproofing to make sure everything continues to work.
manipulated