Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix a couple of vasm tests to work around a gcc-8 bug
Reviewed By: alexeyt
Differential Revision: D10406026
fbshipit-source-id: 91576baf443ea83bf97db058df65baa56003376b
- Loading branch information
Showing
with
6 additions
and
6 deletions.
-
+3
−3
hphp/runtime/test/vasm-xls-test.cpp
-
+3
−3
hphp/runtime/test/vasm.cpp
|
@@ -50,14 +50,14 @@ template<class T> uint64_t test_const(T val) { |
|
|
.sf = x64::abi().sf |
|
|
}; |
|
|
|
|
|
constexpr auto blockSize = 4096; |
|
|
auto blockSize = 4096; |
|
|
auto code = static_cast<uint8_t*>(mmap(nullptr, blockSize, |
|
|
PROT_READ | PROT_WRITE | PROT_EXEC, |
|
|
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)); |
|
|
SCOPE_EXIT { munmap(code, blockSize); }; |
|
|
|
|
|
constexpr auto dataSize = 100; |
|
|
constexpr auto codeSize = blockSize - dataSize; |
|
|
auto const dataSize = 100; |
|
|
auto const codeSize = blockSize - dataSize; |
|
|
// None of these tests should use much data. |
|
|
auto data_buffer = code + codeSize; |
|
|
|
|
|
|
@@ -34,14 +34,14 @@ namespace HPHP { namespace jit { |
|
|
namespace { |
|
|
template<typename T, typename Lcodegen, typename Ltest> |
|
|
void test_function(Lcodegen lcodegen, Ltest ltest) { |
|
|
constexpr auto blockSize = 4096; |
|
|
auto blockSize = 4096; |
|
|
auto code = static_cast<uint8_t*>(mmap(nullptr, blockSize, |
|
|
PROT_READ | PROT_WRITE | PROT_EXEC, |
|
|
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)); |
|
|
SCOPE_EXIT { munmap(code, blockSize); }; |
|
|
|
|
|
constexpr auto dataSize = 100; |
|
|
constexpr auto codeSize = blockSize - dataSize; |
|
|
auto const dataSize = 100; |
|
|
auto const codeSize = blockSize - dataSize; |
|
|
// None of these tests should use much data. |
|
|
auto data_buffer = code + codeSize; |
|
|
|
|
|