Skip to content

Commit 04a00fc

Browse files
committedJul 2, 2018
[OMPT] Use alloca() to force availability of frame pointer
When compiling with icc, there is a problem with reenter frame addresses in parallel_begin callbacks in the interoperability.c testcase. (The address is not available. thus NULL) Using alloca() forces availability of the frame pointer. Patch provided by Simon Convent Differential Revision: https://reviews.llvm.org/D48282 llvm-svn: 336088
1 parent e2eec57 commit 04a00fc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎openmp/runtime/test/ompt/misc/interoperability.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include <iostream>
55
#include <thread>
6+
#include <alloca.h>
67

78
#include "callback.h"
89
#include "omp.h"
@@ -15,6 +16,9 @@ void f() {
1516
// runtime isn't initialized yet...)
1617
omp_get_num_threads();
1718

19+
// Call alloca() to force availability of frame pointer
20+
void *p = alloca(0);
21+
1822
OMPT_SIGNAL(condition);
1923
// Wait for both initial threads to arrive that will eventually become the
2024
// master threads in the following parallel region.

0 commit comments

Comments
 (0)
Please sign in to comment.