Homec4science

Googletest export

Authored by Abseil Team <absl-team@google.com> on Nov 5 2019, 23:32.

Description

Googletest export

Clone+exec death test allocates a single page of stack to run chdir + exec on.
This is not enough when gtest is built with ASan and run on particular
hardware.

With ASan on x86_64, ExecDeathTestChildMain has frame size of 1728 bytes.

Call to chdir() in ExecDeathTestChildMain ends up in
_dl_runtime_resolve_xsavec, which attempts to save register state on the stack;
according to cpuid(0xd) XSAVE register save area size is 2568 on my machine.

This results in something like this in all death tests:

Result: died but not with expected error.
...
[  DEATH   ] AddressSanitizer:DEADLYSIGNAL
[  DEATH   ] =================================================================
[  DEATH   ] ==178637==ERROR: AddressSanitizer: stack-overflow on address ...

PiperOrigin-RevId: 278709790

Details

Committed
Xiaoyi Zhang <zhangxy@google.com>Nov 8 2019, 21:47
Pushed
trottetDec 4 2019, 13:52
Parents
R9484:e08a4602778b: Merge pull request #2549 from kuzkry:pump-support-for-python-3
Branches
Unknown
Tags
Unknown

Event Timeline

Xiaoyi Zhang <zhangxy@google.com> committed R9484:681454dae48f: Googletest export (authored by Abseil Team <absl-team@google.com>).Nov 8 2019, 21:47