Commit Graph
75 Commits
Author SHA1 Message Date
partouf d0b38ab86e bugfix apphome 2022-05-25 18:34:06 +02:00
Matt Godbolt 7bb57642a3 Lint fixes 2022-04-26 09:24:37 -05:00
Matt Godbolt aa65eb5e59 Merge branch 'main' into rr/comma-dangle 2022-04-26 07:19:02 -05:00
Matt Godbolt f77dd84690 Async WINE setup (#3558) 2022-04-26 07:09:37 -05:00
RabsRincon 40fe769459 Set comma-dangle to always in server code and es5 in client code 2022-04-26 05:26:48 +02:00
Matt Godbolt 21b764f392 Unify comma configuration; and apply format to some files. (#3559) 2022-04-25 18:22:11 -05:00
Patrick Quist 5e5e60159a Multifile/IDE mode (#2725) 2021-08-26 21:57:07 +02:00
Rubén Rincón Blanco 387c75a1d7 Adds configs for nsjail cfg and firejail profile paths (#2846)
* Adds configs for nsjail cfg and firejail profile paths

As suggested by @apmorton

Issue #2845

* Add & improve exec tests with new config changes

* Remove stub. Exports are inmutable so no replacing the internal calls

* Resort back to calling the mapping function in the tests too

* But don't call it in the one function that is testing it

* Expand reach of .local gitignore

* Address @apmorton PR review

The tests are now a mess, so I won't merge,
 just in case I get shown how to do it properly
2021-08-11 06:38:04 +02:00
Matt Godbolt a031ef9047 Fix up sandbox directory for interpreters 2021-06-26 16:44:19 -05:00
Matt Godbolt 5c5bc4dd50 Dont array push multiple times 2021-05-27 23:25:37 -05:00
Matt Godbolt 1f135f27af Fire up a firejailed WINE complex even in nsjail mode. 2021-04-06 19:04:44 -05:00
d461b8c43c Add support for nsjail compiler executions (#2569)
* Add support for nsjail compiler executions
* Enable nsjail for beta

Co-authored-by: partouf <partouf@gmail.com>
Co-authored-by: Austin Morton <austinpmorton@gmail.com>
2021-04-06 14:52:16 -05:00
Matt Godbolt aceaae2227 Remove additionalEnv. Treat execOptions.env as always 'in addition to… (#2571)
* Remove additionalEnv. Treat execOptions.env as always 'in addition to base env'. Specifically only pass those env vars through sandboxing
2021-04-03 18:09:58 -05:00
Patrick Quist 7edd6d40ac Time all the things (#2462)
* time executeDirect in ms

* measure library download and extract time

* time package download

* download timings when using execution checkbox

* proof of concept timing graph implementation

* use vertical bars for graph

* add objdump time

* add timing for asm parsing

* add timing graph to execution pane as well

* download timings on execution pane

* things
2021-03-11 17:37:57 +01:00
Patrick Quist 09244df5aa fix compiler firejail execution with ldPath (#2466) 2021-03-06 18:43:50 +01:00
Matt Godbolt 9cbc894ae4 npm run lint-fix 2021-01-16 09:57:34 -06:00
Matt Godbolt 7c9b8c10c8 Support additional env vars in execution
For now hardcoded list of things to make sanitisers colour.
Closes #2339
2020-12-03 23:05:20 -06:00
Austin Morton 80ec4ca90d Optimize instance startup time (#2293)
* Avoid execution queue contention during instance startup if compiler executions would be cached

* Avoid mutating execution options when running wine commands

These mutations would prevent cached executions from functioning correctly
2020-10-16 17:35:44 -04:00
Matt Godbolt f68198af9e Reassign copyright to Compiler Explorer Authors (#2233) 2020-09-26 17:50:40 -05:00
Austin Morton 044dcfbf88 Use ES6 Modules (#2132) 2020-09-26 16:59:26 -04:00
Rubén Rincón BlancoandAustin Morton ccff4b9ee5 Add new eslint rules (#2121)
The largest changes here are:
- enforcing single quotes for strings
- enforcing trailing commas where possible

In addition to those we have enabled several eslint plugins:
- plugin:requirejs/recommended, to enforce some conventions in require statements
- plugin:node/recommended, to enforce correct usage of various node.js APIs
- plugin:unicorn/recommended, which contains a pretty mixed bag of useful rules

This PR attempts to not change code behavior when possible.  In cases where fixing
existing code would change semantics, a linting exclusion has been placed in the 
code base to silence the error.  You can find these by searching for `eslint-disable-next-line`.

Co-authored-by: Austin Morton <austinpmorton@gmail.com>
2020-08-04 16:39:02 -04:00
Simon Hössjer 4df43dde81 Wsl fixes (#2012)
* Disable WINE on WSL

When Compiler Explorer runs from within WSL, it does not need WINE in
order to call Windows executables.

* Fix process working directories on WSL

This ensures that all working directories, when running the
compiler, are WSL compatible.

* Add test to check correct working directory on WSL
2020-06-20 20:39:01 +02:00
Matt Godbolt 5c49e9712b Merge pull request #1843 from mattgodbolt/features/nsjail
Add sandbox support for nsjail
2020-05-14 19:42:13 -05:00
Matt Godbolt ab0f557f02 Don't error by returning a rejected promise as a string; throw an error. Fixes #1848 2020-02-24 22:13:50 -06:00
Austin Morton bbff26fbc3 Add sandbox support for nsjail 2020-02-18 10:56:34 -05:00
Partouf 20dbbf88d1 bugfix for when process cant be spawned 2019-07-19 13:27:42 +02:00
Matt Godbolt 2314ad035e Added an ldPath for every compiler (defaults to sensible relative locations), and pass this when running executables. Should address #1399 2019-05-28 14:39:26 -05:00
Matt Godbolt c98dee650e Remote --timeout from firejail: it adds >1s per invocation! Should help with #1394 2019-05-24 17:18:20 -05:00
Matt Godbolt c44a88be5b Add address space limitations and timeouts. Use for compiler and sandbox limits. Should fix #1393 and helps #429 2019-05-24 10:32:16 -05:00
Matt Godbolt 2dc15a9093 Minor logging fixes; use new command line flags for sandbox 2019-05-20 21:51:12 -05:00
Matt Godbolt 12bd66d50c Workaround for now until we have another firejail patch 2019-05-20 20:26:52 -05:00
Matt Godbolt d516ef42cd Assume a patched CE-specific version of firejail to get a private cwd, and ensure proper cleanup and exit code 2019-05-20 15:22:32 -05:00
Matt Godbolt 1114f6e428 Fix up handling of error indicators. Fixes #1384 2019-05-19 15:13:12 -05:00
Matt Godbolt 0e8bcf8eba Run wine processes in a single, shared, sandbox. Keep a single long-lived CMD around which also implicitly creates the wineserver. Re-isolate ipc 2019-05-17 11:33:56 -05:00
Matt Godbolt 5bee8376eb Fix log message 2019-05-17 08:32:12 -05:00
Matt Godbolt 1f6e4c8f67 Log updates; lots of logging was missing since we moved to the new logger 2019-05-16 17:30:15 -05:00
Matt Godbolt bebd447154 Misc tidyups in exec 2019-05-16 15:28:28 -05:00
Matt Godbolt 4bcffc9356 Make output available to/from wine server and log exit 2019-05-16 15:25:46 -05:00
Matt Godbolt 52c40dfc1e Make fonts available to wine to shut it up. Give WINE runs a private home dir (seems to prevent an occasional hang...) 2019-05-16 15:11:06 -05:00
Matt Godbolt 4a1db6cce1 Run firejail in quiet mode 2019-05-14 12:48:12 -05:00
Matt Godbolt 3f138b1a09 Culmination of several days' worth of work towards running WINE under firejail. See #429 2019-05-13 10:45:24 -05:00
Matt Godbolt 26984ce461 Move all execution to optionally run in firejail (disabled by default) 2019-05-08 14:55:22 -05:00
Matt Godbolt 4639fbedba First sketching of firejail support in mainline (woo). See #429 2019-05-07 16:20:41 -05:00
Partouf c1df52750d log cwd used 2019-03-03 15:25:27 +01:00
Partouf 6e6e929a4a make backward compatible with pervious version 2018-11-08 16:58:34 +01:00
Partouf b691b3f52e support for binary mode on VS compilers 2018-11-08 16:52:31 +01:00
Patrick Quist ad98a4895b lint fix 2018-11-05 01:09:49 +01:00
Petter Wahlman a6ac90b555 lib/exec.js: verify stream validity
* setupOnError
* setupStream

These checks prevent the following error in the output window:
"Internal Compiler Explorer error: TypeError: Cannot read property
'on' of undefined"
2018-09-25 21:58:18 +02:00
Nicole Mazzuca 9ddf22f090 Support Visual C++ and Windows well
This commit adds support for hosting on windows, as well as better
support for the Visual C++ compiler. Specific interesting changes are:

  - switch from /FAsc to /FA
  - order functions in file order
  - support demangling win32-style identifiers with undname
  - clang++ and vc++ on win32 host are both supported
2018-07-28 15:18:43 -07:00
Partouf 0f4908a75c fix #983 2018-06-29 21:05:44 +02:00