Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundled version of libmimalloc-sys will have problems with modern C compilers, but mimalloc_rust is a bit weird upstream #805

Open
NHOrus opened this issue Jan 15, 2025 · 0 comments

Comments

@NHOrus
Copy link

NHOrus commented Jan 15, 2025

purpleprotocol/mimalloc_rust#109 - this may be irrelevant, but it also may be suspicious in light of xz backdooring.

https://bugs.gentoo.org/944110 - for problems with GCC-15 and Clang-19, to be precisely building libmimalloc-sys fails to compile with error

warning: [email protected]: In file included from c_src/mimalloc/src/static.c:25:
warning: [email protected]: c_src/mimalloc/src/os.c: In function 'mi_os_resetx':
warning: [email protected]: c_src/mimalloc/src/os.c:993:35: error: implicit declaration of function 'ATOMIC_VAR_INIT'; did you mean 'ATOMIC_FLAG_INIT'? [-Wimplicit-function-declaration]
warning: [email protected]:   993 |   static _Atomic(size_t) advice = ATOMIC_VAR_INIT(MADV_FREE);
warning: [email protected]:       |                                   ^~~~~~~~~~~~~~~
warning: [email protected]:       |                                   ATOMIC_FLAG_INIT
warning: [email protected]: c_src/mimalloc/src/os.c:993:35: error: initializer element is not constant
warning: [email protected]: In file included from c_src/mimalloc/src/static.c:38:
warning: [email protected]: c_src/mimalloc/src/init.c: At top level:
warning: [email protected]: c_src/mimalloc/src/init.c:28:3: error: initializer element is not constant
warning: [email protected]:    28 |   ATOMIC_VAR_INIT(0), // xthread_free
warning: [email protected]:       |   ^~~~~~~~~~~~~~~
warning: [email protected]: c_src/mimalloc/src/init.c:28:3: note: (near initialization for '_mi_page_empty.xthread_free')
warning: [email protected]: c_src/mimalloc/src/init.c:29:3: error: initializer element is not constant
warning: [email protected]:    29 |   ATOMIC_VAR_INIT(0), // xheap
warning: [email protected]:       |   ^~~~~~~~~~~~~~~
warning: [email protected]: c_src/mimalloc/src/init.c:29:3: note: (near initialization for '_mi_page_empty.xheap')
warning: [email protected]: c_src/mimalloc/src/init.c:94:3: error: initialization of 'mi_block_t *' {aka 'struct mi_block_s *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
warning: [email protected]:    94 |   ATOMIC_VAR_INIT(NULL),
warning: [email protected]:       |   ^~~~~~~~~~~~~~~
warning: [email protected]: c_src/mimalloc/src/init.c:94:3: note: (near initialization for '_mi_heap_empty.thread_delayed_free')
warning: [email protected]: c_src/mimalloc/src/init.c:94:3: error: initializer element is not constant
warning: [email protected]: c_src/mimalloc/src/init.c:94:3: note: (near initialization for '_mi_heap_empty.thread_delayed_free')
warning: [email protected]: c_src/mimalloc/src/init.c:126:3: error: initialization of 'mi_block_t *' {aka 'struct mi_block_s *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
warning: [email protected]:   126 |   ATOMIC_VAR_INIT(NULL),
warning: [email protected]:       |   ^~~~~~~~~~~~~~~
warning: [email protected]: c_src/mimalloc/src/init.c:126:3: note: (near initialization for '_mi_heap_main.thread_delayed_free')
warning: [email protected]: c_src/mimalloc/src/init.c:126:3: error: initializer element is not constant
warning: [email protected]: c_src/mimalloc/src/init.c:126:3: note: (near initialization for '_mi_heap_main.thread_delayed_free')
warning: [email protected]: c_src/mimalloc/src/init.c:328:39: error: initializer element is not constant
warning: [email protected]:   328 | static _Atomic(size_t) thread_count = ATOMIC_VAR_INIT(1);
warning: [email protected]:       |                                       ^~~~~~~~~~~~~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant