Use -chip_check_exe_only to work around SDE VDSO issues.

This seems to avoid the problem but still catches
https://boringssl-review.googlesource.com/13586.

Bug: 197
Change-Id: Ifc9a9035066a0941bb1e5209515337cd2de71a88
Reviewed-on: https://boringssl-review.googlesource.com/18044
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
David Benjamin 2017-07-17 16:15:16 -04:00 committed by Adam Langley
parent 818031ec17
commit c5304e4f3b

View File

@ -162,7 +162,16 @@ func gdbOf(path string, args ...string) *exec.Cmd {
}
func sdeOf(cpu, path string, args ...string) *exec.Cmd {
sdeArgs := []string{"-" + cpu, "--", path}
sdeArgs := []string{"-" + cpu}
// The kernel's vdso code for gettimeofday sometimes uses the RDTSCP
// instruction. Although SDE has a -chip_check_vsyscall flag that
// excludes such code by default, it does not seem to work. Instead,
// pass the -chip_check_exe_only flag which retains test coverage when
// statically linked and excludes the vdso.
if cpu == "p4p" || cpu == "pnr" || cpu == "mrm" || cpu == "slt" {
sdeArgs = append(sdeArgs, "-chip_check_exe_only")
}
sdeArgs = append(sdeArgs, "--", path)
sdeArgs = append(sdeArgs, args...)
return exec.Command(*sdePath, sdeArgs...)
}