Skip to content

Commit 1b60663

Browse files
committed
Remove pthread_create error from ShadowStack
1 parent 7b0e630 commit 1b60663

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

llvm/lib/Transforms/Yk/ShadowStack.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -188,20 +188,10 @@ class YkShadowStack : public ModulePass {
188188
// IR for.
189189

190190
if (CI.getCalledFunction()) {
191-
if (CI.getCalledFunction()->getName() == "pthread_create") {
192-
// The global shadow stack needs to be thread local. In each new
193-
// thread created we need to malloc a new shadow stack and
194-
// assign it to that threads shadow stack global. Note: it's not
195-
// enough to look for `pthread_create` in here, as this call
196-
// could be hidden inside an external library.
197-
Context.emitError(
198-
"Unable to add shadow stack: No support for threads yet!");
199-
return false;
200-
}
201191
// Skip some known intrinsics. YKFIXME: Is there a more general
202192
// solution, e.g. skip all intrinsics?
203-
else if (CI.getCalledFunction()->getName() ==
204-
"llvm.experimental.stackmap") {
193+
if (CI.getCalledFunction()->getName() ==
194+
"llvm.experimental.stackmap") {
205195
continue;
206196
} else if (CI.getCalledFunction()->getName() ==
207197
"llvm.dbg.declare") {

0 commit comments

Comments
 (0)