[PATCH] D137357: [BOLT] Always move JTs in jump-table=move

Rafael Auler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 3 13:54:38 PDT 2022


rafauler created this revision.
rafauler added a reviewer: bolt.
Herald added subscribers: treapster, ayermolo.
Herald added a reviewer: Amir.
Herald added a reviewer: maksfb.
Herald added a project: All.
rafauler requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.

We should always move jump tables when requested. Previously,
we were not moving jump tables of non-simple functions in relocation
mode. That caused a bug detailed in the attached test case: in PIC
jump tables, we force jump tables to be moved, but if they are not
moved because the function is not simple, we could incorrectly update
original entries in .rodata, corruping it under special circunstances
(see testcase).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137357

Files:
  bolt/lib/Core/BinaryEmitter.cpp
  bolt/test/runtime/X86/jump-table-pic-conflict.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137357.473024.patch
Type: text/x-patch
Size: 4619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221103/f28a58ee/attachment.bin>


More information about the llvm-commits mailing list