[llvm-jitlink] Fix a bug in llvm-jitlink's Slab allocator.
authorLang Hames <lhames@gmail.com>
Fri, 11 Feb 2022 07:45:45 +0000 (23:45 -0800)
committerLang Hames <lhames@gmail.com>
Mon, 14 Feb 2022 03:28:38 +0000 (19:28 -0800)
commit887f1e49d0629fe870361b00d3cb8fb07374873f
tree923e328298d7c3d3ad2235907b255b9ea53ea225
parente72fe654b72349d93b86a3dae28fc5bcce970f85
[llvm-jitlink] Fix a bug in llvm-jitlink's Slab allocator.

The slab delta (used to link as if allocated at a specified address) should
remain constant.The update to the delta was accidentally introduced in
962a2479b57f5, but hasn't caused any failures as it only breaks in an obvious
way for multi-file exec uses (our regression tests are all -noexec, and tend to
be single-file).

No testcase here: this is an obscure utility for testing support, and an
uncommon use-case. If the slab allocator is ever moved into LLVM we could add
a unit test to catch this.
llvm/tools/llvm-jitlink/llvm-jitlink.cpp