forked from emscripten-core/emscripten
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
3 changed files
with
12 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters