Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
f3cf0a23
Commit
f3cf0a23
authored
Jun 13, 2011
by
vladlosev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suppresses the tail-call optimization of StackGrowsDown() in GCC4.6 (by Paul Pluzhnikov).
parent
cc265df8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
gtest-death-test.cc
src/gtest-death-test.cc
+6
-4
No files found.
src/gtest-death-test.cc
View file @
f3cf0a23
...
@@ -936,15 +936,17 @@ static int ExecDeathTestChildMain(void* child_arg) {
...
@@ -936,15 +936,17 @@ static int ExecDeathTestChildMain(void* child_arg) {
// GTEST_NO_INLINE_ is required to prevent GCC 4.6 from inlining
// GTEST_NO_INLINE_ is required to prevent GCC 4.6 from inlining
// StackLowerThanAddress into StackGrowsDown, which then doesn't give
// StackLowerThanAddress into StackGrowsDown, which then doesn't give
// correct answer.
// correct answer.
bool
StackLowerThanAddress
(
const
void
*
ptr
)
GTEST_NO_INLINE_
;
void
StackLowerThanAddress
(
const
void
*
ptr
,
bool
*
result
)
GTEST_NO_INLINE_
;
bool
StackLowerThanAddress
(
const
void
*
ptr
)
{
void
StackLowerThanAddress
(
const
void
*
ptr
,
bool
*
result
)
{
int
dummy
;
int
dummy
;
return
&
dummy
<
ptr
;
*
result
=
(
&
dummy
<
ptr
)
;
}
}
bool
StackGrowsDown
()
{
bool
StackGrowsDown
()
{
int
dummy
;
int
dummy
;
return
StackLowerThanAddress
(
&
dummy
);
bool
result
;
StackLowerThanAddress
(
&
dummy
,
&
result
);
return
result
;
}
}
// A threadsafe implementation of fork(2) for threadsafe-style death tests
// A threadsafe implementation of fork(2) for threadsafe-style death tests
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment