You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
../src/test/func/two_alloc_types/main.cc:37:1: warning: ‘host_snmalloc_chunkmap_global_get’ violates the C++ One Definition Rule [-Wodr]
37 | host_snmalloc_chunkmap_global_get(snmalloc::PagemapConfig const**);
| ^
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: type mismatch in parameter 1
224 | SNMALLOC_EXPORT void* SNMALLOC_NAME_MANGLE(snmalloc_chunkmap_global_get)(
| ^
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: type name ‘snmalloc_host::PagemapConfig’ should match type name ‘snmalloc::PagemapConfig’
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: ‘host_snmalloc_chunkmap_global_get’ was previously declared here
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
../src/test/func/two_alloc_types/main.cc:35:1: warning: ‘enclave_snmalloc_chunkmap_global_get’ violates the C++ One Definition Rule [-Wodr]
35 | enclave_snmalloc_chunkmap_global_get(snmalloc::PagemapConfig const**);
| ^
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: type mismatch in parameter 1
224 | SNMALLOC_EXPORT void* SNMALLOC_NAME_MANGLE(snmalloc_chunkmap_global_get)(
| ^
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: type name ‘snmalloc_enclave::PagemapConfig’ should match type name ‘snmalloc::PagemapConfig’
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: ‘enclave_snmalloc_chunkmap_global_get’ was previously declared here
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
[107/211] Linking CXX executable func-two_alloc_types-1
../src/test/func/two_alloc_types/main.cc:37:1: warning: ‘host_snmalloc_chunkmap_global_get’ violates the C++ One Definition Rule [-Wodr]
37 | host_snmalloc_chunkmap_global_get(snmalloc::PagemapConfig const**);
| ^
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: type mismatch in parameter 1
224 | SNMALLOC_EXPORT void* SNMALLOC_NAME_MANGLE(snmalloc_chunkmap_global_get)(
| ^
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: type name ‘snmalloc_host::PagemapConfig’ should match type name ‘snmalloc::PagemapConfig’
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: ‘host_snmalloc_chunkmap_global_get’ was previously declared here
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
../src/test/func/two_alloc_types/main.cc:35:1: warning: ‘enclave_snmalloc_chunkmap_global_get’ violates the C++ One Definition Rule [-Wodr]
35 | enclave_snmalloc_chunkmap_global_get(snmalloc::PagemapConfig const**);
| ^
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: type mismatch in parameter 1
224 | SNMALLOC_EXPORT void* SNMALLOC_NAME_MANGLE(snmalloc_chunkmap_global_get)(
| ^
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: type name ‘snmalloc_enclave::PagemapConfig’ should match type name ‘snmalloc::PagemapConfig’
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: ‘enclave_snmalloc_chunkmap_global_get’ was previously declared here
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
[195/211] Linking CXX executable func-two_alloc_types-oe
../src/test/func/two_alloc_types/main.cc:37:1: warning: ‘host_snmalloc_chunkmap_global_get’ violates the C++ One Definition Rule [-Wodr]
37 | host_snmalloc_chunkmap_global_get(snmalloc::PagemapConfig const**);
| ^
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: type mismatch in parameter 1
224 | SNMALLOC_EXPORT void* SNMALLOC_NAME_MANGLE(snmalloc_chunkmap_global_get)(
| ^
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: type name ‘snmalloc_host::PagemapConfig’ should match type name ‘snmalloc::PagemapConfig’
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: ‘host_snmalloc_chunkmap_global_get’ was previously declared here
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
../src/test/func/two_alloc_types/main.cc:35:1: warning: ‘enclave_snmalloc_chunkmap_global_get’ violates the C++ One Definition Rule [-Wodr]
35 | enclave_snmalloc_chunkmap_global_get(snmalloc::PagemapConfig const**);
| ^
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: type mismatch in parameter 1
224 | SNMALLOC_EXPORT void* SNMALLOC_NAME_MANGLE(snmalloc_chunkmap_global_get)(
| ^
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: type name ‘snmalloc_enclave::PagemapConfig’ should match type name ‘snmalloc::PagemapConfig’
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: ‘enclave_snmalloc_chunkmap_global_get’ was previously declared here
../src/test/func/two_alloc_types/../../../override/malloc.cc:224:25: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
The text was updated successfully, but these errors were encountered:
But then the comparison of pagemap config will complain. @davidchisnall might have some thoughts on the right way to fix this. We might need to create an snmalloc_abi namespace to deal with this correctly, so that the config is just defined once.
I encountered the following with
gcc 10.2.0
:The text was updated successfully, but these errors were encountered: