Using u64 as type for offset changes its value, changing starting address for map in file.
This patch solves Bug 24151, which raises issue while mapping file in mips32.
Details
Details
- Reviewers
kcc dsanders - Commits
- rG3bb721a3fbbe: Merging r243686: --------------------------------------------------------------…
rG043717d5724b: [Sanitizers] [Bug 24151] Generalize type of offset in internal_mmap
rCRT243686: [Sanitizers] [Bug 24151] Generalize type of offset in internal_mmap
rL243686: [Sanitizers] [Bug 24151] Generalize type of offset in internal_mmap
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
The x86 build failed with:
projects/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc:318: undefined reference to `__sanitizer::MapWritableFileToMemory(void*, unsigned long, int, unsigned long)' clang: error: linker command failed with exit code 1 (use -v to see invocation)
OFF_T is unsigned long long on this host.
I've therefore changed the definition in sanitizer_common.h to fix the build. Also, in anticipation of the windows build failing on the same issue I've changed the one in sanitizer_win.cc too.
I'm currently running check-all and I intend to commit on Mohit's behalf if that passes.
Hans+Kostya: Is this ok to merge to the release branch once it's committed?
Comment Actions
Great. Committed in r243686.
I had to make one more trivial change to make the tests pass. buildgo.sh failed because the printf's have a format/type mismatch. There's no portable way to print OFF_T so I'm casting to long long and using %lld