diff options
author | Sam Clegg <sbc@chromium.org> | 2020-12-16 17:38:48 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-16 17:38:48 -0800 |
commit | a8ded16f56afd880a9a6459fe5ce55a8667d9b3e (patch) | |
tree | 5ff17e6523c17cb92a1ca0e1a784572161d61a31 /src | |
parent | 4423bcce31d9162c8f8e4262deda5e9278e0e55c (diff) | |
download | binaryen-a8ded16f56afd880a9a6459fe5ce55a8667d9b3e.tar.gz binaryen-a8ded16f56afd880a9a6459fe5ce55a8667d9b3e.tar.bz2 binaryen-a8ded16f56afd880a9a6459fe5ce55a8667d9b3e.zip |
Add comment a followup to #3424. NFC. (#3449)
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/SafeHeap.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/passes/SafeHeap.cpp b/src/passes/SafeHeap.cpp index 9d2b250f5..2eed23256 100644 --- a/src/passes/SafeHeap.cpp +++ b/src/passes/SafeHeap.cpp @@ -81,6 +81,10 @@ struct AccessInstrumenter : public WalkerPass<PostWalker<AccessInstrumenter>> { AccessInstrumenter(Name getSbrkPtr) : getSbrkPtr(getSbrkPtr) {} void visitLoad(Load* curr) { + // As well as the getSbrkPtr function we also avoid insturmenting the + // module start function. This is because this function is used in + // shared memory builds to load the passive memory segments, which in + // turn means that value of sbrk() is not available. if (getFunction()->name == getModule()->start || getFunction()->name == getSbrkPtr || curr->type == Type::unreachable) { return; |