During strlen compile-time evaluation, make it possible to track size of
strduped strings.
Details
Details
- Reviewers
nikic - Commits
- rGe810d558093c: [ValueTracking] Make getStringLenth aware of strdup
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
4254 | Do you need to check somewhere that the string returned by strdup hasn't been modified? The existing code gets away without any checks for modification because getConstantDataArrayInfo only works on constant globals, but strdup returns a modifiable buffer. |
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
4254 | Great point, sorry for missing that. |
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
4254 | Indeed! |
Comment Actions
Patch reverted by da2d6ebf0ab0badccb89ba20940fdd208636fa59 262eba01b33fd5cda5e4b65a744bac9d87cd7453
Do you need to check somewhere that the string returned by strdup hasn't been modified? The existing code gets away without any checks for modification because getConstantDataArrayInfo only works on constant globals, but strdup returns a modifiable buffer.