[PATCH] D109090: Amends LLVM commit 2518433f861fcb877d0a7bdd9aec1aec1f77505a that was pointed as the source of regression on LLVM12.

Alfredo Dal'Ava JĂșnior via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 1 13:58:00 PDT 2021


adalava created this revision.
Herald added subscribers: steven.zhang, hiraditya.
adalava requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This affects powerpc64*, making binaries crash with segmentation fault
due to bad code generation around "__stack_chk_guard"

Root cause and/or proper fix is under investigation by:

  https://bugs.llvm.org/show_bug.cgi?id=51590


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109090

Files:
  llvm/lib/CodeGen/TargetLoweringBase.cpp


Index: llvm/lib/CodeGen/TargetLoweringBase.cpp
===================================================================
--- llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -1981,7 +1981,8 @@
                                   GlobalVariable::ExternalLinkage, nullptr,
                                   "__stack_chk_guard");
     if (TM.getRelocationModel() == Reloc::Static &&
-        !TM.getTargetTriple().isWindowsGNUEnvironment())
+        !TM.getTargetTriple().isWindowsGNUEnvironment() &&
+	!(TM.getTargetTriple().isPPC64() && TM.getTargetTriple().isOSFreeBSD()))
       GV->setDSOLocal(true);
   }
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109090.370051.patch
Type: text/x-patch
Size: 643 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210901/e3113ab2/attachment.bin>


More information about the llvm-commits mailing list