OSDN Git Service

[RuntimeDyld] Always allocate at least 1 byte for object sections in the JIT to
authorLang Hames <lhames@gmail.com>
Tue, 7 Apr 2015 06:27:56 +0000 (06:27 +0000)
committerLang Hames <lhames@gmail.com>
Tue, 7 Apr 2015 06:27:56 +0000 (06:27 +0000)
commit78906c655566249da0f14c4e23653ea52bd1f571
treed6f7559bf3bf56ee376358e45984d7edab41169e
parentd27a0a9b2cfd378e2ec9a24e29c361f9ff6785ca
[RuntimeDyld] Always allocate at least 1 byte for object sections in the JIT to
ensure that section addresses are distinct.

mapSectionAddress will fail if two sections are allocated the same address,
which can happen if any section has zero size (since malloc(0) is implementation
defined). Unfortunately I've been unable to repro this with a simple test case.

Fixes <rdar://problem/20314015>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234299 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp