-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
statepoints instead of the shadow stack #16847
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
8440b20
aaa
carnaval fbfea22
wip
carnaval 5f9fd33
close
carnaval b7df7ad
fix silly llvm bug
carnaval f9a0897
almost there
carnaval eab56e0
dum dum
carnaval 02a6ca6
squeak squeak
carnaval 8e8a7cc
fix llvm memory dep w/ statepoints
carnaval 0e8eb2b
remove size & link from the frame
carnaval 5f7549f
fix
carnaval 84a0134
ups
carnaval 023c518
-_-
carnaval 9c3a7ab
use memset to zero the temp roots of the gcframe
carnaval File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
diff -ur libunwind-1.1-julia2/src/mi/Gfind_dynamic_proc_info.c libunwind-1.1-julia2.MINE/src/mi/Gfind_dynamic_proc_info.c | ||
--- libunwind-1.1-julia2/src/mi/Gfind_dynamic_proc_info.c 2016-01-06 07:48:23.000000000 -0500 | ||
+++ libunwind-1.1-julia2.MINE/src/mi/Gfind_dynamic_proc_info.c 2016-06-06 08:37:55.364416906 -0400 | ||
@@ -84,8 +84,8 @@ | ||
unw_proc_info_t *pi, int need_unwind_info, | ||
void *arg) | ||
{ | ||
- if (as == unw_local_addr_space) | ||
+ //if (as == unw_local_addr_space) | ||
return local_find_proc_info (as, ip, pi, need_unwind_info, arg); | ||
- else | ||
- return remote_find_proc_info (as, ip, pi, need_unwind_info, arg); | ||
+ /*else | ||
+ return remote_find_proc_info (as, ip, pi, need_unwind_info, arg);*/ | ||
} | ||
Only in libunwind-1.1-julia2.MINE/src/mi: Gfind_dynamic_proc_info.c~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
diff --git a/lib/Analysis/AliasAnalysis.cpp b/lib/Analysis/AliasAnalysis.cpp | ||
index 117f8cb..263dd48 100644 | ||
--- a/lib/Analysis/AliasAnalysis.cpp | ||
+++ b/lib/Analysis/AliasAnalysis.cpp | ||
@@ -445,7 +445,7 @@ ModRefInfo AAResults::callCapturesBefore(const Instruction *I, | ||
|
||
unsigned ArgNo = 0; | ||
ModRefInfo R = MRI_NoModRef; | ||
- for (ImmutableCallSite::arg_iterator CI = CS.arg_begin(), CE = CS.arg_end(); | ||
+ for (auto CI = CS.data_operands_begin(), CE = CS.data_operands_end(); | ||
CI != CE; ++CI, ++ArgNo) { | ||
// Only look at the no-capture or byval pointer arguments. If this | ||
// pointer were passed to arguments that were neither of these, then it | ||
diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp | ||
index be3e5e2..6064e6f 100644 | ||
--- a/lib/CodeGen/PrologEpilogInserter.cpp | ||
+++ b/lib/CodeGen/PrologEpilogInserter.cpp | ||
@@ -1094,7 +1094,7 @@ void PEI::replaceFrameIndices(MachineBasicBlock *BB, MachineFunction &Fn, | ||
unsigned Reg; | ||
MachineOperand &Offset = MI->getOperand(i + 1); | ||
const unsigned refOffset = | ||
- TFI->getFrameIndexReferenceFromSP(Fn, MI->getOperand(i).getIndex(), | ||
+ TFI->getFrameIndexReference(Fn, MI->getOperand(i).getIndex(), | ||
Reg); | ||
|
||
Offset.setImm(Offset.getImm() + refOffset); | ||
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | ||
index 6a727a1..5defd28 100644 | ||
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | ||
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | ||
@@ -7180,8 +7180,8 @@ void SelectionDAGBuilder::populateCallLoweringInfo( | ||
|
||
// Populate the argument list. | ||
// Attributes for args start at offset 1, after the return attribute. | ||
- for (unsigned ArgI = ArgIdx, ArgE = ArgIdx + NumArgs, AttrI = ArgIdx + 1; | ||
- ArgI != ArgE; ++ArgI) { | ||
+ for (unsigned ArgI = ArgIdx, ArgE = ArgIdx + NumArgs, AttrI = ArgIdx+1; | ||
+ ArgI != ArgE; ++ArgI, ++AttrI) { | ||
const Value *V = CS->getOperand(ArgI); | ||
|
||
assert(!V->getType()->isEmptyTy() && "Empty type passed to intrinsic."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,7 @@ using namespace llvm; | |
#include "julia_internal.h" | ||
#include "codegen_internal.h" | ||
#ifdef _OS_LINUX_ | ||
# define UNW_LOCAL_ONLY | ||
//# define UNW_LOCAL_ONLY | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (note this is probably not needed here, I'm not sure anymore I'll have to check) |
||
# include <libunwind.h> | ||
# include <link.h> | ||
#endif | ||
|
@@ -233,7 +233,7 @@ void jl_callback_triggered_linfos(void) | |
jl_call_tracer(jl_linfo_tracer, (jl_value_t*)linfo); | ||
} | ||
} | ||
|
||
#include <iostream> | ||
class JuliaJITEventListener: public JITEventListener | ||
{ | ||
#ifndef USE_MCJIT | ||
|
@@ -322,12 +322,22 @@ class JuliaJITEventListener: public JITEventListener | |
|
||
#ifdef LLVM38 | ||
std::map<StringRef,object::SectionRef,strrefcomp> loadedSections; | ||
uint8_t *text_addr = NULL, *stackmaps_addr = NULL; | ||
size_t text_size = 0; | ||
for (const object::SectionRef &lSection: obj.sections()) { | ||
StringRef sName; | ||
if (!lSection.getName(sName)) { | ||
loadedSections[sName] = lSection; | ||
if (sName == ".llvm_stackmaps") { | ||
stackmaps_addr = (uint8_t*)L.getSectionLoadAddress(lSection); | ||
} else if (sName == ".text") { | ||
text_addr = (uint8_t*)L.getSectionLoadAddress(lSection); | ||
text_size = lSection.getSize(); | ||
} | ||
} | ||
} | ||
if (stackmaps_addr) | ||
jl_gc_register_stackmaps(stackmaps_addr); | ||
auto getLoadAddress = [&] (const StringRef &sName) -> uint64_t { | ||
auto search = loadedSections.find(sName); | ||
if (search == loadedSections.end()) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
osx binutils doesn't have objcopy, and for cross-compile it would need the cross prefix