-
Notifications
You must be signed in to change notification settings - Fork 203
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
dlmalloc: require __heap_end #394
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2f59c61
dlmalloc: require __heap_end
yamt f5f2d77
dlmalloc: add a comment
yamt 1cc8c8f
CI: Bump llvm version
yamt adc74d7
Deal with the resource dir change
yamt 01cac38
dlmalloc: a comment
yamt fd9a8ce
dlmalloc: ABORT on the known linker bug
yamt aa35d19
dlmalloc: avoid LLVM optimizer eliminating the __heap_end check
yamt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should just remove this block and assume
end
is non-NULL.llvm/llvm-project#60829 has been closed (and its really inconceivable to me that somebody would provide a weak definition of this (internal) symbol). If you want to keep some kind of check then perhaps just
assert(end);
with note referring to the bug.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i actually have seen such a code. dump these values for diagnostic purposes.
it's rare for users to use wasi-libc w/o NDEBUG.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I don't think we want to support that configuration, right? Why would somebody weakly define a linker-internal symbol? Can you point to the place where you have seen this? Maybe just
if (!end) abort()
in that case, with a TODO to remove once we can depend on the llvm that contains that fix?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diagnostic purposes.
it just dumps something potentially useful for later trouble shooting.
not open source.
but it's something similar to https://github.com/yamt/garbage/blob/03f9a1a1ee142194905818380f7f0e34287f9c64/wasm/hello/hello.c#L48
i feel it's too early to assume https://reviews.llvm.org/D144747
given that even the latest wasi-sdk doesn't have the fix yet.