native_client/src/native_client.git
3 hours agoRevert "Add embedder interface for fatal log messages." master
teravest@chromium.org [Thu, 24 Jul 2014 16:47:27 +0000 (16:47 +0000)]
Revert "Add embedder interface for fatal log messages."

This reverts a commit of the incorrect patchset for this change.

BUG=chromium:391039
TBR=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/416883003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13526 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

4 hours agoCreate a sel_ldr_launcher_base target.
teravest@chromium.org [Thu, 24 Jul 2014 15:07:06 +0000 (15:07 +0000)]
Create a sel_ldr_launcher_base target.

Chromium needs the definition of SelLdrLauncherBase, but not
SelLdrLauncherStandalone. This change introduces a new "sel_ldr_launcher_base"
target which is smaller than the existing "sel_ldr_launcher" target.

This change is a prerequisite for removing the Chromium trusted plugin loadable
module, as attempted in:
  https://codereview.chromium.org/397243004/

This is because that change causes the trusted plugin to be linked into chrome,
changing the link flags used, and introducing use of the "/MD" flag:
  https://code.google.com/p/chromium/codesearch#chromium/src/build/common.gypi&l=2381

When linked with the /MD flag, the "environ" external symbol used in
sel_ldr_launcher_standalone.cc is no longer defined, causing link errors.

I tested this change by successfully building Chromium with
https://codereview.chromium.org/397243004/ in a Windows debug configuration.

BUG=chromium:394497
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/410303002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13525 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

19 hours agoPassing --config-name to build_nexe.py for all arches.
bradnelson@google.com [Thu, 24 Jul 2014 00:19:07 +0000 (00:19 +0000)]
Passing --config-name to build_nexe.py for all arches.

We were not passing --config-name in all variations in untrusted.gypi.
Adding it and adding checks in build_nexe.py to ensure it is added for all
configs.

BUG=http://code.google.com/p/chromium/issues/detail?id=388502
R=bbudge@chromium.org
TEST=trybots

Review URL: https://codereview.chromium.org/414933003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13524 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

23 hours agoAdd embedder interface for fatal log messages.
teravest@chromium.org [Wed, 23 Jul 2014 21:02:04 +0000 (21:02 +0000)]
Add embedder interface for fatal log messages.

For Chromium, we'd like to report fatal log messages to the JavaScript console
without using SRPC. This change introduces an EmbedderInterface which will
contain callbacks for some of the plugin->renderer messages so that the
embedder can use whatever transport it likes.

This follows the pattern used by NaClValidationCache, which serves a similar
purpose.

BUG=chromium:391039
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/367023004

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13523 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

23 hours agoUpdate .DEPS.git
chrome-admin@google.com [Wed, 23 Jul 2014 20:50:13 +0000 (20:50 +0000)]
Update .DEPS.git

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13522 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

23 hours agoUpdates GN dep, and cleans up some toolchain prep definitions to make it easier to...
noelallen@google.com [Wed, 23 Jul 2014 20:50:01 +0000 (20:50 +0000)]
Updates GN dep, and cleans up some toolchain prep definitions to make it easier to debug what's going on.

R=bradnelson@google.com
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3825

Review URL: https://codereview.chromium.org/393713004

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13521 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

23 hours agoMake build_nexe.py rebuild when script itself has changed.
bradnelson@google.com [Wed, 23 Jul 2014 20:48:55 +0000 (20:48 +0000)]
Make build_nexe.py rebuild when script itself has changed.

BUG=http://code.google.com/p/chromium/issues/detail?id=391093
TEST=trybots, null build ok, touch build_nexe.py rebuilts all, touch source rebuilds.
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/378513006

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13520 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

23 hours agoMake the trybots fail early if 'git cl try' is mistakenly used.
bradnelson@google.com [Wed, 23 Jul 2014 20:47:49 +0000 (20:47 +0000)]
Make the trybots fail early if 'git cl try' is mistakenly used.

Detect if 'git cl try' was used to launch the current try job and fail if so.

BUG=https://code.google.com/p/chromium/issues/detail?id=396761
TEST=git cl try
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/417643003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13519 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

24 hours agoRevert "Non-SFI mode: SCONS_NONSFI_TC clean up."
binji@chromium.org [Wed, 23 Jul 2014 19:08:11 +0000 (19:08 +0000)]
Revert "Non-SFI mode: SCONS_NONSFI_TC clean up."

This reverts r13516.
This change enables run_mmap_test and run_socket_test, which are broken on
pnacl-arm non-sfi.

See http://build.chromium.org/p/client.nacl/builders/oneiric_32-newlib-arm_hw-pnacl-panda-dbg/builds/3961:

======================================================================
Stdout for pnacl_newlib.run_mmap_test:
======================================================================
test1
mmap done
munmap good
test2
test2 skipped
test3
res = 0xffffffff
mmap should not have succeeded, or failed with wrong error
...

======================================================================
Stdout for pnacl_newlib.run_socket_test:
======================================================================
TestDgramSocketpair (DGRAM)FAIL

R=mseaborn@chromium.org
TBR=hidehiko@chromium.org
BUG=http://code.google.com/p/chromium/issues/detail?id=358465

Review URL: https://codereview.chromium.org/417723002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13518 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

37 hours agoNon-SFI Mode: Refactoring. Provide non-SFI version of nacl_irt_query_core.
hidehiko@chromium.org [Wed, 23 Jul 2014 06:40:14 +0000 (06:40 +0000)]
Non-SFI Mode: Refactoring. Provide non-SFI version of nacl_irt_query_core.

nacl_irt_query_core and nacl_irt_query_list will be used from Chromium to implement non-SFI helper linked with newlib.
There exist similar methods for non-SFI mode, so this CL refactors them.

TEST=Ran trybots.
BUG=http://code.google.com/p/chromium/issues/detail?id=358465
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/393773002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13517 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

37 hours agoNon-SFI mode: SCONS_NONSFI_TC clean up.
hidehiko@chromium.org [Wed, 23 Jul 2014 06:34:30 +0000 (06:34 +0000)]
Non-SFI mode: SCONS_NONSFI_TC clean up.

This CL removes SCONS_NONSFI_TC variable from buildbot_pnacl.sh, by merging it into SCONS_NONSFI_TESTS.
So, these tests run also on bots actually.

TEST=Ran trybots.
BUG=http://code.google.com/p/chromium/issues/detail?id=358465
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/409793003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13516 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 days agoUse custom exception class for errors in package_version.
sbc@chromium.org [Mon, 21 Jul 2014 22:38:05 +0000 (22:38 +0000)]
Use custom exception class for errors in package_version.

For user errors, such as badly specified input it is
polite to present a readable error message rather than
a full backtrace.  Using a custom exception class for
the module means we can distinguish between bugs in the
code and user visible errors.

Also, make run_package_version_tests.py executable.

TEST= build/package_version/run_package_version_tests.py
R=dschuff@chromium.org, dyen@chromium.org

Review URL: https://codereview.chromium.org/282633003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13515 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 days agoAdded initial pass of nacl_irt_code_data_alloc.
dyen@chromium.org [Mon, 21 Jul 2014 22:26:51 +0000 (22:26 +0000)]
Added initial pass of nacl_irt_code_data_alloc.

The first pass of nacl_irt_code_data_alloc naively keeps track of
code/data joint allocations. The code segments uses a single
variable that gets incremented upon every allocation, and the data
segments are done by probing allocations using mmap.

R=mcgrathr@chromium.org, mseaborn@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3879
TEST= trybots

Review URL: https://codereview.chromium.org/350953002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13514 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

3 days agoCleanup bionic build script.
noelallen@google.com [Mon, 21 Jul 2014 18:57:25 +0000 (18:57 +0000)]
Cleanup bionic build script.

Clean up unreferences functions, and fix lint warning.

R=bradnelson@google.com
BUG=none

Review URL: https://codereview.chromium.org/400893006

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13513 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

3 days agoFix untrusted.gypi and build_nexe.py
ncbray@chromium.org [Mon, 21 Jul 2014 17:32:54 +0000 (17:32 +0000)]
Fix untrusted.gypi and build_nexe.py

A prior version of this change was commited as r13485 and reverted as
r13506.  In the meantime, functionality was added to fix a bug where
source files with the same name would overwrite eachother's object
files.

BUG=none
R=bradnelson@google.com, dschuff@chromium.org

Review URL: https://codereview.chromium.org/405713003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13512 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

3 days agoUpdate revision for PNaCl r13466->r13509
dschuff@chromium.org [Mon, 21 Jul 2014 16:38:36 +0000 (16:38 +0000)]
Update revision for PNaCl r13466->r13509

Pull the following PNaCl changes into NaCl:
  r13472: (dschuff@chromium.org) Build PNaCl with mingw again
  r13480: (jfb@chromium.org) PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
    | e009cdd: (jfb@chromium.org) Translator: rematerialize constant vector loads
  r13503: (jvoung@google.com) PNaCl: Update compiler-rt revision in pnacl/COMPONENT_REVISIONS
    | 40cce6a: (jvoung@chromium.org) Remove comment about fPIC in Makefile-pnacl.
    | 042faed: (jvoung@chromium.org) Include popcount{si/di}.c in the pruned PNaCl Makefile (and codereview.settings).
  r13508: (dschuff@chromium.org) PNaCl Driver: do not generate temp file names beyond Windows' MAX_PATH limit
  r13509: (jvoung@google.com) Add a flag to pnacl-finalize that allows users to keep function names.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3893
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3762
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3473
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3846
BUG= none
R=jvoung@chromium.org, dschuff@chromium.org, dyen@chromium.org, jfb@chromium.org, jvoung@google.com, kschimpf@google.com, stichnot@chromium.org
TEST=git try
NOTRY=true
(Please LGTM this change and tick the "commit" box)

Review URL: https://codereview.chromium.org/405113003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13511 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

5 days agoDisable flaky sandboxed translator tests on mac
dschuff@chromium.org [Sat, 19 Jul 2014 00:28:04 +0000 (00:28 +0000)]
Disable flaky sandboxed translator tests on mac

The PNaCl offline sandboxed translator is flaky on mac and causes the
tree to close unnecessarily. Disable its tests for now.

Also add the mac trybot to the default trybot set now that it
won't be flaky.

Also, since the sandboxed translator tests are really just to test that
the translator runs, and not to cover all the possibilities for input,
it's not really necessary to run the full nacl test suite.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3856
R=jvoung@chromium.org

Review URL: https://codereview.chromium.org/401073003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13510 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

5 days agoAdd a flag to pnacl-finalize that allows users to keep function names.
jvoung@google.com [Sat, 19 Jul 2014 00:25:49 +0000 (00:25 +0000)]
Add a flag to pnacl-finalize that allows users to keep function names.

This may help with eyeballing issues when compiling
finalized pexes. The NaCl bitcode writer will still
strip out branch labels and local symbols, but it does
handle function names for now.

It's meant for debugging not really meant to be an
ABI requirement.

BUG=none
R=kschimpf@google.com, stichnot@chromium.org

Review URL: https://codereview.chromium.org/398853002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13509 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

5 days agoPNaCl Driver: do not generate temp file names beyond Windows' MAX_PATH limit
dschuff@chromium.org [Fri, 18 Jul 2014 23:45:37 +0000 (23:45 +0000)]
PNaCl Driver: do not generate temp file names beyond Windows' MAX_PATH limit

Most programs on windows do not support paths longer than 260
characters (including LLVM, binutils, ninja and build_nexe.py).
However the driver (particularly the linker) chooses temp
file names that are longer than the output filename.

So, reject paths that are too long with a useful error message,
and try to choose a shorter temp file names (but only when
necessary, since the naming scheme is useful for debugging).

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3846
R=jvoung@chromium.org

Review URL: https://codereview.chromium.org/399283002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13508 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

6 days agoReapply patch which was reverted due to conflict.
noelallen@google.com [Fri, 18 Jul 2014 17:06:27 +0000 (17:06 +0000)]
Reapply patch which was reverted due to conflict.

Fix vc_toolchain.py paths.
Add is_linux check for build
Add trusted_x86 and trusted_x64 toolchains for Mac
Add deps for libnacl.a in copy

NOTE: I will check in with win/mac re-disabled as needed so I can iterate on these fixes.

R=bradnelson@google.com
TBR=bradnelson@chromium.org, bradnelson@google.com
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3825

Review URL: https://codereview.chromium.org/398333005

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13507 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

6 days agoRevert "Fix untrusted.gypi and build_nexe.py"
dschuff@chromium.org [Thu, 17 Jul 2014 22:46:27 +0000 (22:46 +0000)]
Revert "Fix untrusted.gypi and build_nexe.py"

This reverts r13485.
This changes breaks the openssl build in chrome becauss openssl has incorrect
includes in the non-"linux" case (i.e., it fails to include sys/select.h as
POSIX requires, and newlib does not pull in a declaration of select via
other means as glibc does).
Therefore this change cannot roll into Chrome until either the openssl
build is fixed, or until but that team successfully switches to boringssl
(which does not have this problem). But we want to unblock other changes
for now.

R=ncbray@chromium.org, mseaborn@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/403583004

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13506 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

6 days agoRoll PNaCl toolchain revision back to r13466
dschuff@chromium.org [Thu, 17 Jul 2014 22:13:27 +0000 (22:13 +0000)]
Roll PNaCl toolchain revision back to r13466

This reverts r13474 and r13488.

The DEPS roll into Chrome is being blocked by Windows path issues again.
Until a "fix" for that lands, roll back to the last cygwin build.

R=jvoung@chromium.org, mseaborn@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/402723004

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13505 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

7 days agoMunge nacl_helper_bootstrap using python rather than libelf
sehr@chromium.org [Thu, 17 Jul 2014 16:00:07 +0000 (16:00 +0000)]
Munge nacl_helper_bootstrap using python rather than libelf

Removes the linux dependency on libelf, possibly makes cross builds easier.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3895
TEST= readelf -ah, hand examination that memsz and filesz agree for phdr[2]
R=dnj@chromium.org, mseaborn@chromium.org

Review URL: https://codereview.chromium.org/398503002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13504 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

7 days agoPNaCl: Update compiler-rt revision in pnacl/COMPONENT_REVISIONS
jvoung@google.com [Wed, 16 Jul 2014 22:52:14 +0000 (22:52 +0000)]
PNaCl: Update compiler-rt revision in pnacl/COMPONENT_REVISIONS

This pulls in the following compiler-rt changes:

40cce6a: (jvoung@chromium.org) Remove comment about fPIC in Makefile-pnacl.
042faed: (jvoung@chromium.org) Include popcount{si/di}.c in the pruned PNaCl Makefile (and codereview.settings).

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3762
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3882
TEST= PNaCl toolchain trybots
R=dschuff@chromium.org

Review URL: https://codereview.chromium.org/393373002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13503 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

7 days agoUpdate .DEPS.git
chrome-admin@google.com [Wed, 16 Jul 2014 22:44:11 +0000 (22:44 +0000)]
Update .DEPS.git

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13502 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

7 days agoUpdate .DEPS.git
chrome-admin@google.com [Wed, 16 Jul 2014 22:43:11 +0000 (22:43 +0000)]
Update .DEPS.git

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13501 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

8 days agoNon-SFI Mode: Make elf_loader usable from Chrome.
hidehiko@chromium.org [Wed, 16 Jul 2014 18:56:04 +0000 (18:56 +0000)]
Non-SFI Mode: Make elf_loader usable from Chrome.

From chrome, we'll use elf_loader as a module.
This CL exports LoadElfFile, which takes an FD, without main()
funciton, so that elf loader can be shared between nonsfi_helper
and nonsfi_loader.

TEST=Ran trybots.
BUG=358465
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/382143006

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13500 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

8 days agoUpdate .DEPS.git
chrome-admin@google.com [Wed, 16 Jul 2014 02:49:12 +0000 (02:49 +0000)]
Update .DEPS.git

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13499 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

8 days agoUpdate .DEPS.git
chrome-admin@google.com [Wed, 16 Jul 2014 02:48:12 +0000 (02:48 +0000)]
Update .DEPS.git

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13498 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

8 days agoImplemented Exists for pynacl.LocalStorageCache.
dyen@chromium.org [Tue, 15 Jul 2014 22:25:26 +0000 (22:25 +0000)]
Implemented Exists for pynacl.LocalStorageCache.

Local Storage Cache should implement all the functions GSD Storage does.

BUG=None
TEST= ./scons small_tests
R=noelallen@chromium.org

Review URL: https://codereview.chromium.org/393023004

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13497 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

9 days agoRevert of 7e955d3ab6159dc05a7f255c6daf03847809414a
noelallen@google.com [Tue, 15 Jul 2014 18:19:08 +0000 (18:19 +0000)]
Revert of 7e955d3ab6159dc05a7f255c6daf03847809414a
https://codereview.chromium.org/385013003/
TBR=jvoung@google.com

Review URL: https://codereview.chromium.org/390423002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13496 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

9 days agoFix vc_toolchain.py paths.
noelallen@google.com [Tue, 15 Jul 2014 17:59:13 +0000 (17:59 +0000)]
Fix vc_toolchain.py paths.
Add is_linux check for build
Add trusted_x86 and trusted_x64 toolchains for Mac
Add deps for libnacl.a in copy

NOTE: I will check in with win/mac re-disabled as needed so I can iterate on these fixes.

R=bradnelson@chromium.org, bradnelson@google.com
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3825

Review URL: https://codereview.chromium.org/385013003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13495 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

9 days agoAdd per-file OWNERS for .gn in this sub directory since per-file only works on the...
noelallen@google.com [Tue, 15 Jul 2014 17:42:42 +0000 (17:42 +0000)]
Add per-file OWNERS for .gn in this sub directory since per-file only works on the directory the OWNERS is in.

R=sehr@chromium.org

Review URL: https://codereview.chromium.org/387413004

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13494 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

9 days agoRevert "Non-SFI Mode: Implement irt_mprotect."
jvoung@chromium.org [Tue, 15 Jul 2014 16:47:54 +0000 (16:47 +0000)]
Revert "Non-SFI Mode: Implement irt_mprotect."

This reverts commit 1fc77c12208125bba1ede5b6e6ffa96e62ea0ebb
(svn rev 13490). The run_mmap_test_irt is failing on ARM HW
bots w/ nonsfi_nacl=1.

BUG= https://code.google.com/p/chromium/issues/detail?id=358465
TBR=hidehiko@chromium.org,mseaborn@chromium.org

Review URL: https://codereview.chromium.org/394863002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13493 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

9 days agoUpdate .DEPS.git
chrome-admin@google.com [Tue, 15 Jul 2014 14:59:10 +0000 (14:59 +0000)]
Update .DEPS.git

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13492 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

9 days agoUpdate .DEPS.git
chrome-admin@google.com [Tue, 15 Jul 2014 14:58:09 +0000 (14:58 +0000)]
Update .DEPS.git

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13491 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

9 days agoNon-SFI Mode: Implement irt_mprotect.
hidehiko@chromium.org [Tue, 15 Jul 2014 04:40:16 +0000 (04:40 +0000)]
Non-SFI Mode: Implement irt_mprotect.

irt_mprotect is needed to build nonsfi_helper in chromium tree.
This CL implements the function, with enabling the test.

TEST=Ran trybots.
BUG=358465
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/383973002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13490 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

9 days agoWrap irt_interfaces.h by extern "C".
hidehiko@chromium.org [Tue, 15 Jul 2014 04:35:09 +0000 (04:35 +0000)]
Wrap irt_interfaces.h by extern "C".

We'll use this file from Chrome, and Chrome uses C++ code.
So, we wraps the header by extern "C" if this is included from
.cc files.

TEST=Ran trybots.
BUG=358465
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/387733005

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13489 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

9 days agoUpdate revision for PNaCl r13472->r13480
jfb@chromium.org [Mon, 14 Jul 2014 22:52:12 +0000 (22:52 +0000)]
Update revision for PNaCl r13472->r13480

Pull the following PNaCl changes into NaCl:
  r13480: (jfb@chromium.org) PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
    | e009cdd: (jfb@chromium.org) Translator: rematerialize constant vector loads

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3893
R=dschuff@chromium.org
TBR=dschuff@chromium.org, jfb@chromium.org
TEST=git try
NOTRY=true
(Please LGTM this change and tick the "commit" box)

Review URL: https://codereview.chromium.org/390703002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13488 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

9 days agoActually make package_version include logs when argument is set.
dyen@chromium.org [Mon, 14 Jul 2014 22:30:46 +0000 (22:30 +0000)]
Actually make package_version include logs when argument is set.

R=bradnelson@google.com, jvoung@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3872
TEST= trybots

Review URL: https://codereview.chromium.org/389973003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13487 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

9 days agoSplit nacl_defines to an importable .gni file.
teravest@chromium.org [Mon, 14 Jul 2014 20:57:22 +0000 (20:57 +0000)]
Split nacl_defines to an importable .gni file.

Files in Chromium that include public native_client need defines as set up in
the "nacl_defines" config.

This change splits those defines out to an importable gni file so that they can
be reused in Chromium.

I tested this change by building "all" in a gn build of Chromium,
and using the new nacl_defines.gni file in an build rule there.

BUG=
R=noelallen@chromium.org

Review URL: https://codereview.chromium.org/390463002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13486 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

9 days agoFix untrusted.gypi and build_nexe.py
ncbray@chromium.org [Mon, 14 Jul 2014 20:53:19 +0000 (20:53 +0000)]
Fix untrusted.gypi and build_nexe.py

__linux__ should not be defined for untrusted builds.  The presence of this
argument masked problems in build_nexe's arg parsing.

BUG=none
R=bradnelson@google.com

Review URL: https://codereview.chromium.org/389483008

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13485 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

9 days agoRevert "Munge nacl_helper_bootstrap using python rather than libelf"
jfb@chromium.org [Mon, 14 Jul 2014 20:45:20 +0000 (20:45 +0000)]
Revert "Munge nacl_helper_bootstrap using python rather than libelf"

Try reverting this commit to see if the ARM bots stop failing.

R=jvoung@chromium.org, dschuff@chromium.org, mcgrathr@chromium.org, mseaborn@chromium.org, sbc@chromium.org, sehr@chromium.org
TEST= try bots
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3895
NOTRY=true

Review URL: https://codereview.chromium.org/390883003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13484 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

10 days agoUpdate .DEPS.git
chrome-admin@google.com [Mon, 14 Jul 2014 13:17:16 +0000 (13:17 +0000)]
Update .DEPS.git

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13483 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

10 days agoUpdate .DEPS.git
chrome-admin@google.com [Mon, 14 Jul 2014 13:16:32 +0000 (13:16 +0000)]
Update .DEPS.git

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13482 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

10 days agoAlign at 16 bytes for stack for created thread.
hidehiko@chromium.org [Mon, 14 Jul 2014 10:25:34 +0000 (10:25 +0000)]
Align at 16 bytes for stack for created thread.

On x86, thread is not aligned to 16 bytes, so that some code,
such as ones with sse intructions, causes crash. This CL fixes it.

Binaries generated by PNaCl tool chain expect that, on
function invocation, (esp & 0xF) == 0xC.

This is preparation to build nacl_helper for NonSFI with PNaCl
toolchain.

TEST=Ran trybots.
BUG=358465
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/387833002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13481 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

12 days agoPNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
jfb@chromium.org [Sat, 12 Jul 2014 19:57:02 +0000 (19:57 +0000)]
PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS

This pulls in the following LLVM change:

e009cdd: (jfb@chromium.org) Translator: rematerialize constant vector loads

TBR= dschuff@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3893
TEST= PNaCl toolchain trybots

Review URL: https://codereview.chromium.org/382303005

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13480 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

12 days agoReduce debugging metadata for pexe builds in Chrome
dschuff@chromium.org [Fri, 11 Jul 2014 22:34:05 +0000 (22:34 +0000)]
Reduce debugging metadata for pexe builds in Chrome

On Windows, the remoting client build is failing because the bitcode
link is running out of memory. Reducing the debug metadata fixes this
and should make all chrome pexe builds faster.

R=jvoung@chromium.org, sergeyu@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3473
BUG= https://code.google.com/p/chromium/issues/detail?id=388035

Review URL: https://codereview.chromium.org/387123002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13477 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

12 days agoChanges scan_sources not to output on bogus directory
sky@chromium.org [Fri, 11 Jul 2014 22:07:07 +0000 (22:07 +0000)]
Changes scan_sources not to output on bogus directory

The gyp generator analyzer is used for analyzing dependencies. It does
not generate build files. The analyzer generator supplies invalid
directories for some of the builtins, eg SHARED_INTERMEDIATE_DIR. This
means when scan_sources sees the bogus directory it ends up outputting
this information. To avoid the unncessary output I'm changing to only
log if debug is true.

BUG=383609
TEST=none
NOTRY=True

Review URL: https://codereview.chromium.org/389483007

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13476 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

13 days agoMunge nacl_helper_bootstrap using python rather than libelf
sehr@chromium.org [Fri, 11 Jul 2014 17:39:07 +0000 (17:39 +0000)]
Munge nacl_helper_bootstrap using python rather than libelf

Removes the linux dependency on libelf, possibly makes cross builds easier.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3895
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/371293004

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13475 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

13 days agoUpdate revision for PNaCl r13466->r13472
dschuff@chromium.org [Fri, 11 Jul 2014 17:02:50 +0000 (17:02 +0000)]
Update revision for PNaCl r13466->r13472

Pull the following PNaCl changes into NaCl:
  r13472: (dschuff@chromium.org) Build PNaCl with mingw again

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3473
R=jvoung@chromium.org, dschuff@chromium.org, dyen@chromium.org
TEST=git try
NOTRY=true
(Please LGTM this change and tick the "commit" box)

Review URL: https://codereview.chromium.org/385203002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13474 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

13 days agoZap the NaClSignalContext struct in SignalCatch.
earthdok@chromium.org [Fri, 11 Jul 2014 15:50:33 +0000 (15:50 +0000)]
Zap the NaClSignalContext struct in SignalCatch.

Prevent use of uninitialized memory.
Also makes a whitespace change to the license headers in a
few files, to keep the license checker from complaining.

BUG=chromium:390602
R=mseaborn@chromium.org
NOTRY=true
NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/382513003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13473 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

13 days agoBuild PNaCl with mingw again
dschuff@chromium.org [Fri, 11 Jul 2014 05:47:20 +0000 (05:47 +0000)]
Build PNaCl with mingw again

It seems that all the path issues have been taken care of. Again.

R=dyen@chromium.org, jvoung@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3473

Review URL: https://codereview.chromium.org/385713004

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13472 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

13 days agoBuild nacl_bootstrap_helper and test with GN scons
noelallen@google.com [Thu, 10 Jul 2014 23:35:58 +0000 (23:35 +0000)]
Build nacl_bootstrap_helper and test with GN scons

Adds build target for nacl_bootstrap_helper
Adds testing stages for running sel_ldr tests using GN built sel_ldr and nacl_bootstrap_helper

R=sehr@chromium.org, sehr@google.com
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3825

Review URL: https://codereview.chromium.org/383523006

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13471 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

13 days agoUpdate revision for PNaCl r13392->r13466
dschuff@chromium.org [Thu, 10 Jul 2014 21:35:49 +0000 (21:35 +0000)]
Update revision for PNaCl r13392->r13466

Pull the following PNaCl changes into NaCl:
  r13398: (kschimpf@google.com) PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
    | a6a5813: (jvoung@chromium.org) Remove special nacltrap handling from X86 NaCl.
    | 4f2f805: (kschimpf@google.com) Fix issues with verifying PNaCl ABI conditions in pnacl-bcdis.
  r13406: (jvoung@google.com) PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
    | 85481ce: (jvoung@chromium.org) Remove llvm -pnaclabi-allow-dev-intrinsics flag.
    | dc0274d: (jvoung@chromium.org) Finish removing the finer grained Sfi* control flags
  r13411: (dyen@chromium.org) The toolchain_build git cache is now referenced as a git-alternate.
  r13413: (mseaborn@chromium.org) PNaCl dynamic loading: Extend pnacl-translate to be able to translate PSOs
  r13421: (dschuff@chromium.org) PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
    | 39e4a23: (kschimpf@google.com) Allow one module block in pnacl bitcode files for pnacl-bcdis.
    | afe65c9: (mseaborn@chromium.org) Fix Ninja/CMake build, broken by earlier change
    | b398dc3: (dschuff@chromium.org) Make x86-64 sandbox-base-hiding call sequence work with PIC
  r13425: (dyen@chromium.org) Revert temporary fix to override LLVM's git repository detection.
  r13428: (jfb@chromium.org) PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
    | 4695f52: (dschuff@chromium.org) Fix comments about PIC return address calculation
    | b9e272a: (kschimpf@google.com) Add skip block method to NaCl bitcode parser.
    | 6d1bf2a: (jfb@chromium.org) PNaCl SIMD: don't perform constant propagation in expand-shufflevector
  r13432: (dyen@chromium.org) All commands invoked for toolchain_build now have separate log files.
  r13433: (dyen@chromium.org) Fix toolchain build for windows.
  r13437: (jfb@chromium.org) PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
    | f4619cc: (jfb@chromium.org) PNaClABIErrorReporter: remove last virtual
    | 9030097: (jfb@chromium.org) GlobalizeConstantVectors: set Unnamed addr
    | 9e9e032: (kschimpf@google.com) Turn off type signature checking in pnacl-bcdis.
  r13442: (dyen@chromium.org) Added support for log uploading for commands in toolchain_build.
  r13451: (dyen@chromium.org) Package Version script now supports downloading build logs.
  r13454: (dyen@chromium.org) Added support for uploading log urls when uploading toolchain packages.
  r13457: (dyen@chromium.org) LLVM Regression tests check for build files instead of empty dirs.
  r13460: (jfb@chromium.org) PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
    | 484d9b5: (jfb@chromium.org) Reduce redundancy created by PNaCl's vector globalization pass
  r13466: (dschuff@chromium.org) pnacl-ld: Do not attempt to parse ELF or bitcode files as linker scripts

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3893
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3852
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3894
BUG= none
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3872
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3873
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3858
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3814
R=mseaborn@chromium.org, bradnelson@google.com, dschuff@chromium.org, dyen@chromium.org, jfb@chromium.org, jvoung@chromium.org, jvoung@google.com, kschimpf@google.com
TEST=git try
NOTRY=true
(Please LGTM this change and tick the "commit" box)

Review URL: https://codereview.chromium.org/382863002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13470 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

13 days agoStub out pnacl-opt and pnacl-finalize tools for scons built_elsewhere=1
dschuff@chromium.org [Thu, 10 Jul 2014 20:42:32 +0000 (20:42 +0000)]
Stub out pnacl-opt and pnacl-finalize tools for scons built_elsewhere=1

This is required to make the PSO generation test pass on ARM hardware;
(or more specifically, opt will run on the x86 bot, and get stubbed
out on the hardware bot). Stubbing out pnacl-finalize isn't
required for that particular test but is just for completeness.
R=mseaborn@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3873

Review URL: https://codereview.chromium.org/388573005

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13469 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoMake testing architecture explicit PNaCl toolchain buildbot script
dschuff@chromium.org [Thu, 10 Jul 2014 19:41:12 +0000 (19:41 +0000)]
Make testing architecture explicit PNaCl toolchain buildbot script

Our 32-bit slaves are moving to 64 bit kernels with 32-bit userspace
which makes platform.machine() return unexpected results. Rather than
having the script detect the platform, make it a flag.

R=mseaborn@chromium.org
BUG= https://code.google.com/p/chromium/issues/detail?id=388853

Review URL: https://codereview.chromium.org/381123002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13468 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoRemove NaClSrpcIsStandalone() function.
jvoung@chromium.org [Thu, 10 Jul 2014 17:18:36 +0000 (17:18 +0000)]
Remove NaClSrpcIsStandalone() function.

... and its reference to the NACL_SRPC_STANDALONE env var.

Sehr noticed this in another CL cleaning up env cleanser.
Nothing appears to check it.

BUG=none
R=sehr@chromium.org

Review URL: https://codereview.chromium.org/377383005

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13467 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agopnacl-ld: Do not attempt to parse ELF or bitcode files as linker scripts
dschuff@chromium.org [Thu, 10 Jul 2014 16:20:30 +0000 (16:20 +0000)]
pnacl-ld: Do not attempt to parse ELF or bitcode files as linker scripts

Currently ldtools attempts to parse a file to see if it is a linker
script. An ELF file was found that confused the parser and caused it to
try to seek outside the file. Do not try to parse files that are known
to be non-scripts.

Also move ParseLinkerScript and IsLinkerScript to filetype.py
to break the circular dependency.

R=jvoung@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/379353002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13466 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoImplement initial MSan support. Also, adjust ASan build flags.
earthdok@chromium.org [Thu, 10 Jul 2014 16:02:59 +0000 (16:02 +0000)]
Implement initial MSan support. Also, adjust ASan build flags.

- Support the --msan flag in scons,
- add an MSan check when copying data to user memory, to
ensure we don't leak any uninitialized values across the
sandbox boundary.

This CL also touches the --asan build configuration, adding
some compiler flags that are required to get nice stack
traces in reports.

BUG=385669
R=mseaborn@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/338293004

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13465 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agosyscall_test: Do not test st_atime in the test for fstat
hamaji@chromium.org [Thu, 10 Jul 2014 06:04:32 +0000 (06:04 +0000)]
syscall_test: Do not test st_atime in the test for fstat

While POSIX says st_atime is updated only when the contents
of a file is read/modified, it seems Windows XP updates it
even when we only access the metadata of a file.

TEST=./scons run_syscall_test_irt run_irt_futex_test_irt \
     --mode=dbg-host,nacl_irt_test bitcode=1 nonsfi_nacl=1
BUG=None
TBR=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/387433003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13464 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoCorrect the return type of TestSuite in timefuncs_test
hamaji@chromium.org [Thu, 10 Jul 2014 04:21:22 +0000 (04:21 +0000)]
Correct the return type of TestSuite in timefuncs_test

BUG=None
TEST=./scons run_timefuncs_test
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/379063002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13463 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoNon-SFI Mode: Implement IRT fstat
hamaji@chromium.org [Thu, 10 Jul 2014 04:20:14 +0000 (04:20 +0000)]
Non-SFI Mode: Implement IRT fstat

Also add a test for fstat in syscall_test and run it even with
newlib based nonsfi_loader on builders.

TEST=./scons run_syscall_test_irt run_irt_futex_test_irt \
     --mode=dbg-host,nacl_irt_test bitcode=1 nonsfi_nacl=1
TEST=./scons run_syscall_test_irt run_irt_futex_test_irt \
     --mode=dbg-host,nacl_irt_test bitcode=1 nonsfi_nacl=1 \
      platform=arm
TEST=./scons run_syscall_test_irt run_irt_futex_test_irt \
     --mode=dbg-host,nacl_irt_test bitcode=1 nonsfi_nacl=1 \
     use_newlib_nonsfi_loader=0
TEST=./scons run_syscall_test_irt run_irt_futex_test_irt \
     --mode=dbg-host,nacl_irt_test bitcode=1 nonsfi_nacl=1 \
      platform=arm use_newlib_nonsfi_loader=0
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3851
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/358253002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13462 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoNon-SFI Mode: Add prctl syscall wrapper
hamaji@chromium.org [Thu, 10 Jul 2014 04:16:16 +0000 (04:16 +0000)]
Non-SFI Mode: Add prctl syscall wrapper

Also run the new tests in the builder.

TEST=./scons run_prctl_test bitcode=1 nonsfi_nacl=1
TEST=./scons run_prctl_test bitcode=1 nonsfi_nacl=1 platform=arm
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3851
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/355413002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13461 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoPNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
jfb@chromium.org [Thu, 10 Jul 2014 00:16:28 +0000 (00:16 +0000)]
PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS

This pulls in the following LLVM change:

484d9b5: (jfb@chromium.org) Reduce redundancy created by PNaCl's vector globalization pass

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3893
TEST= PNaCl toolchain trybots
R=dschuff@chromium.org
TBR=dschuff@chromium.org

Review URL: https://codereview.chromium.org/377403003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13460 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoRemove env cleanser references to obsolete env vars.
jvoung@chromium.org [Wed, 9 Jul 2014 22:38:10 +0000 (22:38 +0000)]
Remove env cleanser references to obsolete env vars.

Spotted while trying to clean up the docs:
https://codereview.chromium.org/383523004/

BUG=https://code.google.com/p/chromium/issues/detail?id=266395
R=sehr@chromium.org

Review URL: https://codereview.chromium.org/380893003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13459 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoUpdate and add GN files to build sel_ldr.
noelallen@google.com [Wed, 9 Jul 2014 19:56:58 +0000 (19:56 +0000)]
Update and add GN files to build sel_ldr.

Adds missing ARCH files for sel_ldr and validator.
Fix trusted or untrusted only build files created with scons->gn

Add missing DEPS in libraries to allow sel_ldr to link.
Renames nccopy_x86_32 and nccopy_x86_64 to just nccopy since they are the same on both x86 platforms.

TBR=bradnelson@google.com
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3825
TEST=./scons platform=x86_64 -j20 force_sel_ldr=../out/trusted_x64/sel_ldr small_tests
(Use GN built sel_ldr on scons tests)

Review URL: https://codereview.chromium.org/381693002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13458 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoLLVM Regression tests check for build files instead of empty dirs.
dyen@chromium.org [Wed, 9 Jul 2014 18:37:23 +0000 (18:37 +0000)]
LLVM Regression tests check for build files instead of empty dirs.

R=dschuff@chromium.org
BUG=None
TEST=pnacl toolchain_build trybots

Review URL: https://codereview.chromium.org/380843002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13457 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoGive the minidump_generator_lib gyp rule a shorter name
dschuff@chromium.org [Tue, 8 Jul 2014 23:04:58 +0000 (23:04 +0000)]
Give the minidump_generator_lib gyp rule a shorter name

On windows, the SDK build path for this library expands to something like
D:\src\build_slave_cr_win_rel_build\src\out\gypbuild\Release\obj\native_client\src\untrusted\minidump_generator\minidump_generator_lib.gen\pnacl_newlib-pnacl\minidump_generator_lib\minidump_generator_lib.o
which exceeds the MAX_PATH limit of 260 chars and causes build problems.
Because the library name expands into the path twice (and because filenames
are referred to by the SDK build files in the chrome tree) the easiest way
to shorten it is to give the build rule a shorter name.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3846
R=binji@chromium.org

Review URL: https://codereview.chromium.org/371363007

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13456 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoUpdated some documentation for the package_version files.
dyen@chromium.org [Tue, 8 Jul 2014 22:42:39 +0000 (22:42 +0000)]
Updated some documentation for the package_version files.

R=jvoung@chromium.org
BUG=None
TEST=trybots

Review URL: https://codereview.chromium.org/376923004

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13455 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoAdded support for uploading log urls when uploading toolchain packages.
dyen@chromium.org [Tue, 8 Jul 2014 21:40:54 +0000 (21:40 +0000)]
Added support for uploading log urls when uploading toolchain packages.

R=jvoung@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3872
TEST= toolchain_build trybots, inspect packages.json files.

Review URL: https://codereview.chromium.org/377973002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13454 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoCreate GN files for trusted source libraries.
noelallen@google.com [Tue, 8 Jul 2014 17:34:48 +0000 (17:34 +0000)]
Create GN files for trusted source libraries.

Still need to finish validator, and other components for sel_ldr.  Once it's complete we can test the whole thing by using a GN built sel_ldr in our test harness.

TBR=bradnelson@google.com
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3825

Review URL: https://codereview.chromium.org/362323006

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13453 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoNon-SFI Mode: Add isatty interface
hamaji@chromium.org [Tue, 8 Jul 2014 01:51:14 +0000 (01:51 +0000)]
Non-SFI Mode: Add isatty interface

Chrome does not require this. However, without this, PNaCl
newlib's stdio crashes when the output is a TTY (it calls
isatty only when stat.st_mode is S_IFCHR).

TEST=./scons run_syscall_test bitcode=1 nonsfi_nacl=1
TEST=./scons run_syscall_test bitcode=1 nonsfi_nacl=1 platform=arm
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3851
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/341063005

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13452 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoPackage Version script now supports downloading build logs.
dyen@chromium.org [Mon, 7 Jul 2014 22:29:57 +0000 (22:29 +0000)]
Package Version script now supports downloading build logs.

A new option "--include-logs" has been included to package_version.py
when running the "sync" command. This flag has been added to the NaCl
tree for the convenience of NaCl developers, and left off for chromium
intentionally.

R=jvoung@chromium.org, bradnelson@google.com
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3872
TEST= trybots

Review URL: https://codereview.chromium.org/371073002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13451 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoConsolidate sel_ldr's configuration logic.
ncbray@chromium.org [Mon, 7 Jul 2014 21:28:59 +0000 (21:28 +0000)]
Consolidate sel_ldr's configuration logic.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3889
R=sehr@chromium.org

Review URL: https://codereview.chromium.org/372713007

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13450 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoUndo cros-specific hack now that r13435 seems to have stuck.
thakis@chromium.org [Mon, 7 Jul 2014 21:25:40 +0000 (21:25 +0000)]
Undo cros-specific hack now that r13435 seems to have stuck.

This effectively reverts r13430.

BUG=390666, 368384
Review URL: https://codereview.chromium.org/375603004

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13449 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoFixed repo_tools invalid reference to pynacl.
dyen@chromium.org [Mon, 7 Jul 2014 20:51:16 +0000 (20:51 +0000)]
Fixed repo_tools invalid reference to pynacl.

repo_tools is already inside of pynacl so references to
log_tools should not have the pynacl prefix.

R=dschuff@chromium.org, bradnelson@google.com
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3872
TEST= trybots

Review URL: https://codereview.chromium.org/377653002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13448 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoAdd my chromium account to OWNERS with my google account.
ncbray@chromium.org [Mon, 7 Jul 2014 19:28:53 +0000 (19:28 +0000)]
Add my chromium account to OWNERS with my google account.

BUG=none
R=sehr@chromium.org

Review URL: https://codereview.chromium.org/372713006

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13447 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoFactor arg parsing in sel_ldr into its own function.
ncbray@chromium.org [Mon, 7 Jul 2014 18:31:29 +0000 (18:31 +0000)]
Factor arg parsing in sel_ldr into its own function.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3889
R=mcgrathr@chromium.org, ncbray@google.com

Review URL: https://codereview.chromium.org/355993003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13446 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoAdded a log_url field to package archs and recalculated revision hashes.
dyen@chromium.org [Mon, 7 Jul 2014 18:24:25 +0000 (18:24 +0000)]
Added a log_url field to package archs and recalculated revision hashes.

It will be useful to have access to build logs for each package archive.
This adds a log_url field to each package archive json file. Since the
hash check for the revision files will now fail (they do not have the
new field), I have added a command "recalcrevisions" which recalculates
the hashes for all the revision files. I have run it and also added the
updated revision files here.

R=jvoung@chromium.org, bradnelson@google.com
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3872
TEST= trybots

Review URL: https://codereview.chromium.org/373603006

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13445 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoUpdate .DEPS.git
chrome-admin@google.com [Mon, 7 Jul 2014 17:42:12 +0000 (17:42 +0000)]
Update .DEPS.git

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13444 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoRolls DEPS file to get deps aware toolchains.
noelallen@google.com [Mon, 7 Jul 2014 17:41:20 +0000 (17:41 +0000)]
Rolls DEPS file to get deps aware toolchains.
  Roll DEPS
  Add untar deps to copy steps in prep stage

Updates BUILDCONFIG to be more like chrome version.
  Add android build files.
  Add missing compiler version.
  Removes injected deps in set_defaults
  Update features.gn
  Update compiler/BUILD.gn

R=bradnelson@google.com
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3825

Review URL: https://codereview.chromium.org/366773002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13443 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoAdded support for log uploading for commands in toolchain_build.
dyen@chromium.org [Mon, 7 Jul 2014 16:21:43 +0000 (16:21 +0000)]
Added support for log uploading for commands in toolchain_build.

Now that we have logs for each command during toolchain_build, this CL
uploads each log to the cloud when a command gets memoized. Each log
is also marked with link annotations for buildbots. When downloading
a memoized packaged, it will also download the corresponding log to the
working directory.

R=bradnelson@google.com, dschuff@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3872
TEST= toolchain_build trybots

Review URL: https://codereview.chromium.org/368873006

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13442 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoUpdate .DEPS.git
chrome-admin@google.com [Mon, 7 Jul 2014 15:08:31 +0000 (15:08 +0000)]
Update .DEPS.git

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13441 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoUpdate .DEPS.git
chrome-admin@google.com [Mon, 7 Jul 2014 15:07:30 +0000 (15:07 +0000)]
Update .DEPS.git

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13440 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoUpdate .DEPS.git
chrome-admin@google.com [Sun, 6 Jul 2014 09:32:30 +0000 (09:32 +0000)]
Update .DEPS.git

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13439 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

2 weeks agoUpdate .DEPS.git
chrome-admin@google.com [Sun, 6 Jul 2014 09:31:50 +0000 (09:31 +0000)]
Update .DEPS.git

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13438 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

3 weeks agoPNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
jfb@chromium.org [Wed, 2 Jul 2014 22:47:00 +0000 (22:47 +0000)]
PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS

This pulls in the following LLVM changes:

f4619cc: (jfb@chromium.org) PNaClABIErrorReporter: remove last virtual
9030097: (jfb@chromium.org) GlobalizeConstantVectors: set Unnamed addr
9e9e032: (kschimpf@google.com) Turn off type signature checking in pnacl-bcdis.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3894
TEST= PNaCl toolchain trybots
TBR= dschuff@chromium.org

Review URL: https://codereview.chromium.org/368083002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13437 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

3 weeks agoUse Chromium SDK finder to set mac_sdk
sehr@chromium.org [Wed, 2 Jul 2014 21:18:03 +0000 (21:18 +0000)]
Use Chromium SDK finder to set mac_sdk

Previously the mac build was hard-coded to expect the 10.6 SDK to be installed.
This is not true with xcode for OSX 10.9, so use the find_sdk.py script
from Chromium.

BUG=none
R=noelallen@chromium.org

Review URL: https://codereview.chromium.org/368033003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13436 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

3 weeks agoOnly set target-based -m flag for target builds.
thakis@chromium.org [Wed, 2 Jul 2014 21:00:49 +0000 (21:00 +0000)]
Only set target-based -m flag for target builds.

There are at least five ways to do 32bit builds:

1. On a 32bit host
2. On a 64bit host, just setting target_arch=ia32, building everything in 32bit
3. Like 2, but with a host/target split, building host in 64bit and target in
32bit, with multilib
4. Like 3, but with a --sysroot for 32bit instead of multilib.
5. With a 64bit kernel in a 32bit chroot. Then both host_arch and target_arch
are ia32.

NaCl used to always add -m32 in all five cases. After this change, it stops
doing this for 3 and 4 and builds host binaries in 64bit in these builds.

To do this, set host_arch to the output of detect_nacl_host_arch and then let
target_arch depend on host_arch instead of the other way round; and check
host_arch and target_arch separately for adding -m32 etc flags.

(The NaCl bots use 1 and 2, the chrome bots use 5; the chromeos bots might use
3 or 4?)

BUG=390666, 368384
Review URL: https://codereview.chromium.org/369473002/

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13435 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

3 weeks agoUnify module loading and starting in public interface.
teravest@chromium.org [Wed, 2 Jul 2014 18:20:08 +0000 (18:20 +0000)]
Unify module loading and starting in public interface.

This unifies NaClChromeMainLoad and NaClChromeMainStart back into
NaClChromeMainStartApp in the public native client interface.

The split is no longer necessary since module loading isn't planned to
switch to Chromium IPC.

BUG=chromium:333950
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/367793003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13434 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

3 weeks agoFix toolchain build for windows.
dyen@chromium.org [Wed, 2 Jul 2014 16:41:04 +0000 (16:41 +0000)]
Fix toolchain build for windows.

There are 2 issues that are caused by my previous CL adding log file to
toolchain_build:
   1. Windows needs the log file handles to be closed, our unit
      tests attempt to delete the work directory after each test.
   2. I mishandled one of the variables when logging debug messages
      for commands, windows needs to copy the batch file version of
      our shell scripts.

R=dschuff@chromium.org, bradnelson@google.com
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3872
TEST= windows toolchain_build_pnacl trybot

Review URL: https://codereview.chromium.org/361263002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13433 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

3 weeks agoAll commands invoked for toolchain_build now have separate log files.
dyen@chromium.org [Wed, 2 Jul 2014 14:37:27 +0000 (14:37 +0000)]
All commands invoked for toolchain_build now have separate log files.

Any commands run during toolchain_build now has a "logger" argument
available. This logger will record the log into a separate file under
the work directory, and later copied to the out directory after the
command is finished. The memoized builds will also contain this log,
a user can simply inspect it in their output directory.

The log file always logs at the most verbose level, so I have taken
the liberty of adding various debug logging that helps specify each
command that was run.

R=dschuff@chromium.org, bradnelson@google.com
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3872

Review URL: https://codereview.chromium.org/343433010

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13432 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

3 weeks agoDo not leak uninitialized data to user memory.
earthdok@chromium.org [Tue, 1 Jul 2014 21:21:59 +0000 (21:21 +0000)]
Do not leak uninitialized data to user memory.

Zero out the structs we copy in NaClSysGetTimeOfDay() and
NaClSysClockGetCommon(), as they may have uninitialized padding at the end.

BUG=chromium:385669
R=mseaborn@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/362813003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13431 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

3 weeks agoTemporarily add back -m32 hack for ChromeOS
thakis@chromium.org [Tue, 1 Jul 2014 21:11:49 +0000 (21:11 +0000)]
Temporarily add back -m32 hack for ChromeOS

The Chrome OS chroot has libelf in the wrong bitness for the 32bit builders as
far as I can tell. Until that's resolved, add back the -m32 hack for them.

BUG=390666
R=achuith@chromium.org
TBR=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/366733002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13430 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

3 weeks agoUpdates BUILDCONFIG to make it closer to the version in Chrome.
noelallen@google.com [Tue, 1 Jul 2014 20:36:44 +0000 (20:36 +0000)]
Updates BUILDCONFIG to make it closer to the version in Chrome.

Re-paths otherwise unmodified config files from //build to //native_client/build to work in the native client tree.

Update buildbot_standard.py to make testing on Win/Mac trybots easier.

R=bradnelson@google.com
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3825

Review URL: https://codereview.chromium.org/362593002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13429 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

3 weeks agoPNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
jfb@chromium.org [Tue, 1 Jul 2014 19:59:04 +0000 (19:59 +0000)]
PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS

This pulls in the following LLVM changes:

4695f52: (dschuff@chromium.org) Fix comments about PIC return address calculation
b9e272a: (kschimpf@google.com) Add skip block method to NaCl bitcode parser.
6d1bf2a: (jfb@chromium.org) PNaCl SIMD: don't perform constant propagation in expand-shufflevector

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3873
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3890
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3893
TEST= PNaCl toolchain trybots
R=dschuff@chromium.org

Review URL: https://codereview.chromium.org/365703002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13428 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

3 weeks agoNon-SFI Mode: Add syscall wrappers for Chrome IPC
hamaji@chromium.org [Tue, 1 Jul 2014 08:36:40 +0000 (08:36 +0000)]
Non-SFI Mode: Add syscall wrappers for Chrome IPC

poll, recvmsg, sendmsg, shutdown, and socketpair are added.
Their declarations are added in src/public/linux/poll.h and
src/public/linux/sys/socket.h. Not all socket operations are
supported. This change only adds/tests features necessary for
Chrome IPC.

Add a test for these socket APIs and run it on builders.

TEST=./scons run_socket_test bitcode=1 nonsfi_nacl=1
TEST=./scons run_socket_test bitcode=1 nonsfi_nacl=1 platform=arm
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3851
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/351893002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13427 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

3 weeks agoAdd the new validator to the GN build.
noelallen@google.com [Tue, 1 Jul 2014 00:05:27 +0000 (00:05 +0000)]
Add the new validator to the GN build.

R=bradnelson@google.com
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3825

Review URL: https://codereview.chromium.org/349213005

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13426 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

3 weeks agoRevert temporary fix to override LLVM's git repository detection.
dyen@chromium.org [Mon, 30 Jun 2014 17:40:56 +0000 (17:40 +0000)]
Revert temporary fix to override LLVM's git repository detection.

Now that we have a proper fix for having correct LLVM git repositories
along with the git_cache, we no longer need the temporary fix.

The real fix is found here: https://codereview.chromium.org/355883002/

This CL reverts r13390.

R=dschuff@chromium.org
BUG=None

Review URL: https://codereview.chromium.org/358523006

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13425 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2