Details
- Reviewers
cferris cryptoad - Commits
- rG415147702117: [scudo] Switch to use MemMap in tests
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I notice a lot of casting in the use of the map. Would it make sense to create some helper functions that return void* and also take void*? I don't think it's worth doing here, but something to think about as a follow-up cl.
For example, you could add getMapBasePtr that returns void*, and add another version of remap/map that takes void* and calls the uptr version. Maybe add some others where you would have had to cast the pointers around.
Remove some reinterpret_cast<>() by using scudo::uptr if possible. In general,
we only need void* when using memset in these tests.
In general, we expect most of operations are operating on uptr. It will use void* only when it binds to other system APIs. For example, we use memset in these tests. I revise a little bit so the we try to use uptr as much as possible and which reduces the use of reinterpret_cast. Let me know if it looks more clean.
compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp | ||
---|---|---|
52 | This is a bug. I'll revert this change |
This is a bug. I'll revert this change