Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always use
size_t
in dlmalloc's mallinfo
For some reason emscrpiten was overriding MALLINFO_FIELD_TYPE to be int even though this defaults size_t and size_t is the document type in the man page, and size_t allows for correct reporting of numbers larger than 2^32. What is worse the `MALLINFO_FIELD_TYPE` override was only place when `DLMALLOC_DEBUG` was defined which meant that `MALLINFO_FIELD_TYPE` varied between `-sASSERTIONS=1` and `-sASSERTIONS=2` builds of dlmalloc. This means that `-sMEMORY64 + -sASSERTIONS=2` builds of dlmalloc were simply broken WRT `mallinfo` since the public definition of mallinfo disagreed with the dlmalloc-internal version. I verified that the follow tests fails without this change: EMCC_CFLAGS=-sASSERTIONS=2 ./test/runner wasm64.test_mallinfo I'm not updating the actual test code here since test coverage will be coming in emscripten-core#23330. This change was spit out from emscripten-core#23330.
- Loading branch information