I compiled a "fio_ceph_messenger. DLL" running on windows for FIO
testing, but the original code is Linux, and the default size of long
is 64 bits, but it is 32 bits on windows, resulting in a crash during
pointer conversion. Now it has been running well in my computer
Signed-off-by: wt.tao <i237731947@outlook.com>
static void *str_to_ptr(const std::string &str)
{
- return (void *)strtoul(str.c_str(), NULL, 16);
+ // str is assumed to be a valid ptr string
+ return reinterpret_cast<void*>(ceph::parse<uintptr_t>(str, 16).value());
}
static std::string ptr_to_str(void *ptr)