summaryrefslogtreecommitdiffstats
path: root/sandbox
Commit message (Collapse)AuthorAgeFilesLines
* Linux sandbox: clean temporary file creationjln@chromium.org2013-07-171-29/+41
| | | | | | | | Cleanup temporary file creation to its own re-usable class. Review URL: https://chromiumcodereview.appspot.com/19368008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212068 0039d316-1c4b-4281-b951-d872f2087c98
* Linux sandbox unittests: make tests pass as rootjln@chromium.org2013-07-161-21/+28
| | | | | | | | | | | Android sometimes run the tests as root. Make sure that our unittests pass when running as root. R=jorgelo@chromium.org Review URL: https://codereview.chromium.org/19240009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211842 0039d316-1c4b-4281-b951-d872f2087c98
* Linux Sandbox: cleanup code around spurious SIGSYS detection.jln@chromium.org2013-07-121-5/+4
| | | | | | | | | | | | Sometimes, we receive spurious SIGSYS signals. Clean up this code a little to make it more clear which problems we're actually seeing. BUG=178166 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/19054014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211313 0039d316-1c4b-4281-b951-d872f2087c98
* Linux Sandbox unittests: fix Valgrind detection.jln@chromium.org2013-07-115-19/+41
| | | | | | | | | | | | | | RUNNING_ON_VALGRIND was used as a compile-time option. However, Valgrind has to be detected dynamically. Because of this bug, Valgrind was always considered running and we would never assert properly that seccomp-bpf was available when running our tests. BUG=259106 R=jorgelo@chromium.org Review URL: https://codereview.chromium.org/18539020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211001 0039d316-1c4b-4281-b951-d872f2087c98
* Linux Sandbox: forward declare Errorcode in sandbox_bpf_policy_forward.hjln@chromium.org2013-07-101-2/+2
| | | | | | | | | | | | | sandbox_bpf_policy_forward.h can forward declare ErrorCode. This should fix a Chromium on MIPS compilation issue. BUG=130022 NOTRY=true R=markus@chromium.org Review URL: https://codereview.chromium.org/18943004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210691 0039d316-1c4b-4281-b951-d872f2087c98
* Avoid std::string copying in GetFileNameInWhitelist.jorgelo@chromium.org2013-07-091-7/+12
| | | | | | | | | | | BUG=256452 TEST=sandbox_linux_unittests passes. TEST=about:gpu shows "Sandboxed: true", browser works. NOTRY=true Review URL: https://chromiumcodereview.appspot.com/18337010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210651 0039d316-1c4b-4281-b951-d872f2087c98
* sandbox_linux_unittests: ignore TSAN when counting threads.jln@chromium.org2013-07-034-12/+23
| | | | | | | | | | | | | | | | TSAN uses a helper thread. For all intent and purposes it should be hidden and it looks like we can fork() happily with this thread running. So when counting threads, we ignore it. We still disable BPF sandbox tests under TSAN though, the BPF sandbox is not compatible with TSAN. BUG=256905,243968 R=glider@chromium.org Review URL: https://codereview.chromium.org/18603002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210014 0039d316-1c4b-4281-b951-d872f2087c98
* Add compiler flags that prevent text relocations.shashishekhar@chromium.org2013-07-031-0/+5
| | | | | | | | | | | | | | Text relocations are a minor security risk. Add compiler flags that prevent them from reappearing in Android binary. All existing occurences have been removed after http://crrev.com/17714003. TEST=Compile. BUG=b/8061013 Review URL: https://chromiumcodereview.appspot.com/17820002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209885 0039d316-1c4b-4281-b951-d872f2087c98
* sandbox_linux_unittests: disable fork() tests under TSAN.jln@chromium.org2013-07-032-2/+12
| | | | | | | | | | | | | | | Make sure that sandbox_linux_unittests can run under TSAN by simply disabling the tests that require forking. This will need to be fixed better in the future, but this will allow us to run part of sandbox_linux_unittests under TSAN immediately. BUG=256905 R=ajwong@chromium.org Review URL: https://codereview.chromium.org/18580009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209845 0039d316-1c4b-4281-b951-d872f2087c98
* linux: make libc urandom override work for non-glibc toomostynb@opera.com2013-06-291-16/+89
| | | | | | | | | | This patch attempts to generalise the linux libc urandom override, so that it works for non-glibc linux platforms too. BUG=255215 Review URL: https://chromiumcodereview.appspot.com/18093002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209281 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 208924 "attempt to make the libc urandom override work fo..."asvitkine@chromium.org2013-06-271-86/+19
| | | | | | | | | | | | | | | | | | | | Broke Linux ASAN build: [1054/1063] LINK nacl_helper ../../chrome/nacl/nacl_helper_linux.cc:229: error: undefined reference to 'sandbox::InitLibcUrandomOverrides()' > attempt to make the libc urandom override work for non-glibc too > > This patch attempts to generalise the linux libc urandom override, so > that it works for non-glibc linux platforms too. > > Review URL: https://chromiumcodereview.appspot.com/17066002 TBR=mostynb@opera.com Review URL: https://codereview.chromium.org/18069003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208926 0039d316-1c4b-4281-b951-d872f2087c98
* attempt to make the libc urandom override work for non-glibc toomostynb@opera.com2013-06-271-19/+86
| | | | | | | | | This patch attempts to generalise the linux libc urandom override, so that it works for non-glibc linux platforms too. Review URL: https://chromiumcodereview.appspot.com/17066002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208924 0039d316-1c4b-4281-b951-d872f2087c98
* Use non-array operator new for memory deleted by non-array delete.bruening@google.com2013-06-211-4/+4
| | | | | | | | | | BUG=252425 R=cpu@chromium.org TEST=Dr. Memory no longer reports the mismatch Review URL: https://codereview.chromium.org/16983011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207829 0039d316-1c4b-4281-b951-d872f2087c98
* Sandbox: be defensive against compiler (de)optimizations when handling IPCs.rvargas@chromium.org2013-06-201-14/+32
| | | | | | | | | | | | We capture the IPC buffer before doing real work with it, but a crazy compiler _could_ mess up the initial checks that we do. So, do more checks! BUG=247898 TEST=current tests. Review URL: https://chromiumcodereview.appspot.com/17126002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207309 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: add a public content/ API to start a sandbox.jln@chromium.org2013-06-183-6/+32
| | | | | | | | | | | Add a new API to start a sandbox for process types out of content/. BUG=229673, 168812 Review URL: https://chromiumcodereview.appspot.com/16775010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206939 0039d316-1c4b-4281-b951-d872f2087c98
* don't override libc code in a glibc-specific way when not using glibcmostynb@opera.com2013-06-131-1/+3
| | | | | | | | | | We should not attempt to override libc functions using glibc-specific code when not actually using glibc. This still needs to be fixed for other libc's though. Review URL: https://chromiumcodereview.appspot.com/16132015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206040 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of strings headers in rlz/, sandbox/, skia/, sql/, sync/.avi@chromium.org2013-06-1113-13/+13
| | | | | | | | | | BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16358024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205458 0039d316-1c4b-4281-b951-d872f2087c98
* Fix new[]/delete mismatches in sandbox handle code by switching to ↵bruening@chromium.org2013-06-082-4/+7
| | | | | | | | | | | | scoped_ptr<C, base::FreeDeleter>. BUG=246802 R=jschuh@chromium.org TEST=browser_tests under Dr. Memory Review URL: https://chromiumcodereview.appspot.com/16404003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205053 0039d316-1c4b-4281-b951-d872f2087c98
* Fix DCHECK_NT macrohans@chromium.org2013-05-301-1/+1
| | | | | | | | | | | | | | The expressions on both sides of the : should have the same type, in this case void. This fixes a Clang error. BUG=82385 R=jschuh@chromium.org Review URL: https://codereview.chromium.org/16101011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203153 0039d316-1c4b-4281-b951-d872f2087c98
* Include stddef.h for the definition of size_t.hans@chromium.org2013-05-301-0/+2
| | | | | | | | | | These errors were caught by Clang. BUG=82385 Review URL: https://chromiumcodereview.appspot.com/16196003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203136 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: remove unmaintained SELinux code.phajdan.jr@chromium.org2013-05-175-63/+0
| | | | | | | | | | | | See https://groups.google.com/a/chromium.org/d/msg/chromium-dev/YpU7t2XaGRg/V9-diQZQQDwJ for discussion. BUG=none R=agl@chromium.org, jln@chromium.org Review URL: https://codereview.chromium.org/14771026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200838 0039d316-1c4b-4281-b951-d872f2087c98
* Grab bag of clang fixes for Windows codernk@chromium.org2013-05-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These should hopefully be uncontroversial, so I'm sending them to Darin because he has global OWNERS approval on src/*. Let me know if you want to split this up and farm it out to individual components. R=darin@chromium.org CC=thakis@chromium.org BUG=82385 Fix some -Wdeprecated-writable-strings warnings for wide string literals. net/dns/dns_config_service_win_unittest.cc net/http/http_auth_sspi_win.cc net/http/http_auth_sspi_win.h ui/shell_dialogs/select_file_dialog_win_unittest.cc Use reinterpret_cast<> to convert from void * to a function pointer. chrome/browser/policy/policy_loader_win.cc content/browser/gamepad/gamepad_platform_data_fetcher_win.cc Remove "public" from a typedef. It's not clear that that really means. chrome/browser/enumerate_modules_model_unittest_win.cc Escape an unescaped backslash in a wide string iteral to prevent it from being interpreted as a unicode literal ("\uXXX"). chrome/browser/storage_monitor/test_portable_device_watcher_win.cc Use base::UTF8ToUTF16() over ATL::CA2W() and avoid an unnecessary c_str(). Clang can't convert from CA2WEX<> to string16. chrome/browser/ui/views/external_tab_container_win.cc Fix a -Wenum-compare warning when asserting that two enum values are equal. sandbox/win/src/policy_params.h Don't define va_copy for clang. It provides one in <stdarg.h>. third_party/leveldatabase/port/port_chromium.h Review URL: https://chromiumcodereview.appspot.com/15200005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200814 0039d316-1c4b-4281-b951-d872f2087c98
* Linux sandbox: fix O_CLOEXEC support.jln@chromium.org2013-05-012-5/+19
| | | | | | | | | | | | Buggy userland code can sometimes check for O_CLOEXEC when what it really wants is to check for FD_CLOEXEC. We work around this. BUG=237283 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/14787006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197733 0039d316-1c4b-4281-b951-d872f2087c98
* sandbox_linux_unittests: fail if the kernel does not support BPF.jln@chromium.org2013-04-301-0/+9
| | | | | | | | | | | If the kernel does not support seccomp-bpf, sandbox_linux_unittests will fail. BUG=236716 Review URL: https://chromiumcodereview.appspot.com/14601002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197466 0039d316-1c4b-4281-b951-d872f2087c98
* Remove seccomp-legacy: phase 2.jln@chromium.org2013-04-301-9/+1
| | | | | | | | | | | | This should completely get rid of seccomp-legacy (15000+ LOC). BUG=230142 TBR=ben@chromium.org NOTRY=true Review URL: https://chromiumcodereview.appspot.com/14271018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197301 0039d316-1c4b-4281-b951-d872f2087c98
* Linux sandbox: allow non racy use of O_CLOEXECjln@chromium.org2013-04-262-29/+26
| | | | | | | | | | | | | The current support of O_CLOEXEC in Open() in the broker process is racy. We make it non racy by using MSG_CMSG_CLOEXEC in recvmsg when getting the new file descriptor over the Unix socket. BUG=232077, 232068 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/14407005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196554 0039d316-1c4b-4281-b951-d872f2087c98
* Linux sandbox: support O_NONBLOCK and O_CLOEXECjln@chromium.org2013-04-253-18/+65
| | | | | | | | | | | | | - Stop handling O_NONBLOCK in a special way, it's not special. - Handle O_CLOEXEC as much as possible by emulating it via fcntl. BUG=232077, 232068 TEST=sandbox_linux_unittests NOTRY=true Review URL: https://chromiumcodereview.appspot.com/14166016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196291 0039d316-1c4b-4281-b951-d872f2087c98
* Re-enable the BrokerProcess.OpenFileRW test on Android.palmer@chromium.org2013-04-241-11/+3
| | | | | | Review URL: https://chromiumcodereview.appspot.com/14305010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196070 0039d316-1c4b-4281-b951-d872f2087c98
* Linux sandbox: add access() brokering to the async-signal safe broker process.jln@chromium.org2013-04-244-55/+305
| | | | | | | | | | | | We add support for access() that is consistent with our support for open(). BUG=232077,232068 TEST=sandbox_linux_unittests NOTRY=true Review URL: https://codereview.chromium.org/14301014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195945 0039d316-1c4b-4281-b951-d872f2087c98
* Remove inline definition of SIZE_MAX in header.thakis@chromium.org2013-04-191-10/+3
| | | | | | | | | | | | | suid_unsafe_environment_variables.h is included both in C and C++ and is a little clunky. Clean things up a bit. BUG=233330 Review URL: https://codereview.chromium.org/14328030 Patch from Julien Tinnes <jln@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195066 0039d316-1c4b-4281-b951-d872f2087c98
* Fix small race in the sandboxcpu@chromium.org2013-04-194-9/+4
| | | | | | | | | | | | | | | DuplicateHandle with DUPLICATE_CLOSE_SOURCE always closes the handle, right now on failure we close it which means we are closing an invalid handle or closing some other handle in the small race window. Reported by Ashutosh Mehra from Adobe. BUG=233251 TEST=none Review URL: https://chromiumcodereview.appspot.com/13912024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195029 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite scoped_array<T> to scoped_ptr<T[]> in sandbox.dcheng@chromium.org2013-04-129-10/+10
| | | | | | | | | | | This is a manual cleanup pass using sed for files which are not built on Linux. BUG=171111 Review URL: https://chromiumcodereview.appspot.com/13888007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194027 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite std::string("") to std::string(), Linux edition.dcheng@chromium.org2013-04-091-1/+1
| | | | | | | | | | | | | | | | | | | This patch was generated by running the empty_string clang tool across the Chromium Linux compilation database. Implicitly or explicitly constructing std::string() with a "" argument is inefficient as the caller needs to emit extra instructions to pass an argument, and the constructor needlessly copies a byte into internal storage. Rewriting these instances to simply call the default constructor appears to save ~14-18 kilobytes on an optimized release build. BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193020 Review URL: https://codereview.chromium.org/13145003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193040 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Rewrite std::string("") to std::string(), Linux edition."dcheng@chromium.org2013-04-091-1/+1
| | | | | | | | | | | | | | This reverts commit e59558b78e8c6a1b0bd916a724724b638c3c91b6. Revert "Fix build after r193020." This reverts commit 558a35897f6b3ffbcaefde927c1f150b815d140a. Revert "Really fix build after r193020." This reverts commit e3748a79b523a8d365d4a33ef986eebb4186fa78. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193030 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite std::string("") to std::string(), Linux edition.dcheng@chromium.org2013-04-091-1/+1
| | | | | | | | | | | | | | | | | This patch was generated by running the empty_string clang tool across the Chromium Linux compilation database. Implicitly or explicitly constructing std::string() with a "" argument is inefficient as the caller needs to emit extra instructions to pass an argument, and the constructor needlessly copies a byte into internal storage. Rewriting these instances to simply call the default constructor appears to save ~14-18 kilobytes on an optimized release build. BUG=none Review URL: https://codereview.chromium.org/13145003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193020 0039d316-1c4b-4281-b951-d872f2087c98
* Linux Sandbox: assert monothreaded in testsjln@chromium.org2013-04-031-7/+5
| | | | | | | | | | | | When we start a new test that requires fork(), assert that we are not currently multi-threaded. BUG=225809 NOTRY=true Review URL: https://codereview.chromium.org/13430016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191957 0039d316-1c4b-4281-b951-d872f2087c98
* Update the remaining references to sys_string_conversions.h to its new location.tfarina@chromium.org2013-03-302-3/+3
| | | | | | | | | | | | BUG=196305 TBR=isherman@chromium.org,rsleevi@chromium.org,keybuk@chromium.org,fischman@chromium.org, thestig@chromium.org,alexeypa@chromium.org,rogerta@chromium.org,cpu@chromium.org, akalin@chromium.org,ben@chromium.org,tony@chromium.org Review URL: https://chromiumcodereview.appspot.com/13322003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191479 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor sandbox_policy.cc so that it doesn't contain the sandbox policies ↵jam@chromium.org2013-03-201-0/+2
| | | | | | | | | | | | | | | | | | | | for all processes. Instead have whoever creates a sandboxed process set this data. This allows us to clean a few NaCl related changes in content: -remove NaCl sandbox rules from content -remove the hack for ifdef'ing out the GPU policy since it didn't link for nacl64.exe -remove the 1GB memory reservation for the NaCl loader process out of content Other cleanup: -renamed sandbox_policy.* to sandbox_win.* to match the other platform-specific sandbox files -moved BrokerGetFileHandleForProcess to internal content files since it's not called from outside -remove AddGpuDllEvictionPolicy since it was redundant (the one dll it removed was already listed in the generic list) There's still more cleanup to be done in the sandbox code (i.e. remove chrome frame switch, nacl process type switch etc). I will do that in future changes. BUG=191682 Review URL: https://codereview.chromium.org/12805004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189175 0039d316-1c4b-4281-b951-d872f2087c98
* Android sandbox: workaround for restricted errno values.jln@chromium.org2013-03-112-3/+37
| | | | | | | | | | | | | On Android, errno are only supported up to 255 and are not processed otherwise. Fix a test to work around this issue. BUG=181647,169416 NOTRY=true TBR=markus Review URL: https://chromiumcodereview.appspot.com/12638015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187410 0039d316-1c4b-4281-b951-d872f2087c98
* The 'sandbox' target is always 'none'.bungeman@chromium.org2013-02-281-1/+0
| | | | | | | | | | In revision 143549 seccomp_bpf was moved to its own target, however the line changing 'sandbox' to a static_library was left behind. This should be removed as it is misleading and leads to odd build generator behavior (like an empty build.ninja file). Review URL: https://codereview.chromium.org/12340115 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185143 0039d316-1c4b-4281-b951-d872f2087c98
* SECCOMP-BPF: Refactor the BPF sandbox API to use objects rather than ↵markus@chromium.org2013-02-2624-990/+1071
| | | | | | | | | | | | | | | | "static" methods. This change allows us to stack multiple instances of the sandbox. Also, split up headers in a generally saner fashion. BUG=130662 TEST=sandbox_linux_unittests Review URL: https://chromiumcodereview.appspot.com/12223109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184541 0039d316-1c4b-4281-b951-d872f2087c98
* Move file_path.h to base/files.brettw@chromium.org2013-02-241-1/+1
| | | | | | TBR=sky git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184344 0039d316-1c4b-4281-b951-d872f2087c98
* SECCOMP-BPF: Added support for checking system call arguments against bit masks.markus@chromium.org2013-02-158-55/+1041
| | | | | | | | | | | | This is a second attempt. The original CL was tracked at https://chromiumcodereview.appspot.com/11613016 BUG=130662 TEST=sandbox_linux_unittests Review URL: https://chromiumcodereview.appspot.com/11648028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182698 0039d316-1c4b-4281-b951-d872f2087c98
* Remove sandbox win64 warningjschuh@chromium.org2013-02-121-7/+0
| | | | | | | | | Tests all pass and are getting enabled on the bots this week. BUG=168414 Review URL: https://codereview.chromium.org/12221109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181924 0039d316-1c4b-4281-b951-d872f2087c98
* Ignore DEP and SEHOP flags on Win64jschuh@chromium.org2013-02-121-0/+3
| | | | | | | | | | These flags aren't supported on 64-bit and can throw an error on Win8 process creation. BUG=147752 Review URL: https://chromiumcodereview.appspot.com/12207106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181840 0039d316-1c4b-4281-b951-d872f2087c98
* Replace FilePath with base::FilePath in some more top level directories.brettw@chromium.org2013-02-102-2/+3
| | | | | | Review URL: https://codereview.chromium.org/12217101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181640 0039d316-1c4b-4281-b951-d872f2087c98
* Disable ProcessMitigationsTest.CheckDep on Win64jschuh@chromium.org2013-02-071-2/+2
| | | | | | | | DEP is already enabled by default and Win64 throws an error when you try to manipulate the setting at all. Review URL: https://codereview.chromium.org/12218061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181382 0039d316-1c4b-4281-b951-d872f2087c98
* Added a unittest to check that we can restrict syscall(__NR_clone)markus@chromium.org2013-02-071-0/+55
| | | | | | | | | | BUG=130662 TEST=sandbox_linux_unittests Review URL: https://chromiumcodereview.appspot.com/12207029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181121 0039d316-1c4b-4281-b951-d872f2087c98
* Linux sandbox: add warning if running tests multithreaded.jln@chromium.org2013-02-052-5/+22
| | | | | | | | | BUG=169416 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/12207004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180747 0039d316-1c4b-4281-b951-d872f2087c98
* Windows: Allow subprocesses to inherit non-console stdout/stderrmseaborn@chromium.org2013-02-038-3/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, the renderer and other subprocesses never inherit stdout and stderr when they are pipe handles. Stdout/stderr will be pipe handles when chrome.exe/browser_tests.exe is running under Buildbot or under Cygwin's default terminal, mintty. We fix this by specifying PROC_THREAD_ATTRIBUTE_HANDLE_LIST in the arguments to CreateProcess(). The fix only applies on Windows >=Vista. Although it's probably safe for stdout/stderr to be inherited when it is a pipe handle or file handle, we put this behind the flag "--enable-logging". (This flag already makes stderr work when chrome.exe/browser_tests.exe is running under a Windows console -- a case which is not handled by the code path we're adding here because a Windows console is not an inheritable kernel handle.) Note that this relies on the fix committed in http://crrev.com/178656. BUG=171836 TEST=manually add logging to renderer process and check that it appears when running chrome.exe or browser_tests.exe Review URL: https://chromiumcodereview.appspot.com/12033045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180303 0039d316-1c4b-4281-b951-d872f2087c98