628 Commits
Author SHA1 Message Date
J. Ryan Stinnett e7b22b41be Limit exec streams to max string length (#5898)
Some operations set `exec`'s `maxOutput` to a value larger than the max
string length. This change ensures we always cap output to the engine's
string limit (currently 512 MB in recent Node versions).

This also tweaks handling when reaching the string limit to ensure
adding the "truncated" message itself does not send us beyond the limit.
2023-12-23 17:54:46 -06:00
Matt GodboltandJeremy 32ddf75adc Update to ts5 (#5879)
Co-authored-by: Jeremy <51220084+jeremy-rifkin@users.noreply.github.com>
2023-12-18 20:11:11 -06:00
J. Ryan StinnettandMatt Godbolt f0e1d5d264 Add Racket optimisation pipeline (#5836)
This adds a Racket optimisation pipeline view by reusing the existing
LLVM-focused optimisation pipeline UI. A Racket-specific pass parser
translates its output into passes for the UI to present.

This new Racket optimisation pipeline view is currently only enabled for
Racket nightly, as it depends on [recent
changes](https://github.com/racket/racket/pull/4842) to Racket's
compiler output to function.

This also extends the opt pipeline view to allow customising the
function selector label as well as the options and filters for each
compiler where needed.


![image](https://github.com/compiler-explorer/compiler-explorer/assets/279572/f540b41e-fd55-4375-bb2d-a0bb977530b3)

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-12-11 19:35:45 -06:00
Matt Godbolt 87e4d460df Cache AWS creds at startup and reuse (#5814)
Also errors early if we can't get them at all, and configures retries
and timeouts

Mitigation for #5813
2023-11-27 22:32:04 -06:00
Ofek c0db47487c Fix #5784 (#5793)
Fix the name of the entry block in an IR control flow graph.
2023-11-27 10:33:03 -05:00
Patrick Quist 04efa86241 Changes to support CMake for Windows (#5769) 2023-11-22 03:06:26 +01:00
partouf 72af7a5ed6 add unittest for paths 2023-11-21 14:52:09 +01:00
Ofek 31bd47909f Fix #4931 and #2218 (#5706) 2023-11-11 13:56:25 +01:00
Patrick Quist d5fd1ae3a7 Fix shared state close issue (#5725) 2023-11-10 00:13:53 +01:00
Patrick Quist 455d92916a Execution with heaptrack (#5644) 2023-11-07 23:59:40 +01:00
partouf e4f2bf6b42 update clientstate with filter binaryObject & libraryCode 2023-11-07 18:19:07 +01:00
David Spickett 971889e5d7 LLVM TableGen: Add actions to Overrides menu (#5699) 2023-11-04 20:54:43 +01:00
Ofek bb66fc6a97 Fix #5694 (#5703) 2023-11-04 20:54:24 +01:00
Jeremy c122979cb4 Fix tests so the ts tests are ran 2023-11-03 12:44:46 -04:00
Matt Godbolt edeca232c5 Handle errors in the LLVM transform (#5690)
Previously an error in e.g. YAML parsing would take down the whole
process.

Part of #5686 but doesn't fix the underlying issue.
2023-10-30 19:40:45 -05:00
Jeremy be5a980247 Relax asm parse time test threshold for github CI being slow 2023-10-24 15:30:00 -04:00
partouf 46b45a87b9 extra unwrap 2023-10-22 12:18:14 +02:00
Rounak Shrestha bd164adf14 Test conversion ts (#5517) 2023-10-22 12:15:44 +02:00
Jeremy 394d29193a Fix another ReDoS vulnerability, turns out this was exploitable too with the same input 2023-10-21 00:52:59 -04:00
Patrick Quist 31af117d68 support new IR Dump header (#5603) 2023-10-15 18:44:27 +02:00
Matt Godbolt a94e10697e Reduce the size of tests for bug #1285 (#5561)
As best I can tell the bug happens due to stuff happening _before_ the
user code. So I have removed anything after the user code (ie the giant
gob of dwarf debug info and symbols), in an attempt to reduce the test
sizes in general.

I manually undid the fix from #1285 and the tests correctly fail with
this reduced input.
2023-10-08 18:11:32 -05:00
Matt Godbolt 01dbc378d5 Reduce binary tests to first 5000 lines (#5562)
Just to reduce test size. Unlike an earlier change I haven't done
extensive investigation as to what we might be missing as these weren't
specifically targeted tests, more smoke/regression tests, and my hope is
5000 lines is enough (previously they were 30+k each)
2023-10-05 19:07:45 -05:00
Matt Godbolt 62e7fffb09 Admit a certain amount of defeat (for now) and bump the timeout to 10s 2023-10-05 18:34:56 -05:00
fghzxm 0989427c12 asm-parser: Recognize more dataDefn directives (#5535)
This patch adds more data definition directives to be recognized by
`AsmParser` in lib/parsers/asm-parser.ts.

Fixes #5489, as well as inappropriate filtering of `.double` directives
in test/filter-cases/diab.asm which is similar to #5489.

The list of data directives are taken from the "Assembler Directives"
chapter of the [GNU `as` manual][as]. Directives added by this patch
are:

- `.dc[size]`
- `.dcb[size]`
- `.ds[size]`
- `.double`
- `.fill`
- `.float`
- `.int`
- `.single`
- `.skip`
- `.space`
- `.string8`, `.string16`, `.string32`, `.string64`

The `.space` directive is not a data directive when assembling for the
HPPA architecture; this must be fixed if HPPA support is to be added to
Compiler Explorer.

Some of the directives such as `.string64` are pretty unlikely to be
emitted by actual compilers, but we add them because it can't break
existing input (no `as`-compatible compiler can use them as non-data
directives), and will futureproof us against future compilers that do
emit them.

Architecture-specific directives documented in the "Machine Dependent
Features" chapter are not added in this patch, even though it may be
better to add some of them (such as `.stringz`) as well. Existing
directives that are not found on the "Assembler Directives" list are not
removed.

`.sleb128` and `.uleb128` are technically data directives, but aren't
added because we assume they're only used in debuginfo.

[as]: https://sourceware.org/binutils/docs-2.41/as/index.html

<!-- THIS COMMENT IS INVISIBLE IN THE FINAL PR, BUT FEEL FREE TO REMOVE
IT
Thanks for taking the time to improve CE. We really appreciate it.
Before opening the PR, please make sure that the tests & linter pass
their checks,
  by running `make check`.
In the best case scenario, you are also adding tests to back up your
changes,
  but don't sweat it if you don't. We can discuss them at a later date.
Feel free to append your name to the CONTRIBUTORS.md file
Thanks again, we really appreciate this!
-->
2023-10-05 07:32:04 -05:00
Matt Godbolt 6c476bbccc Support abandoned queued compilations (#5278)
After some time we know either the client or CloudFront will give up on
pending compilations. As such, if we continue to process compilations
after the client's timed out we're just clogging up the compilation
queue with pointless work.

As such, this change now supports the notion of "stale" work which will
be abandoned once it's made it to the front of the queue. Only compiles
coming from the user will be abandoned, so discovery and health checks
are unaffected.

Hopefully this will mitigate the number of nodes marked unhealthy due to
being overloaded: work they were doing was "pointless" anyway, and them
being killed by going unhealthy is equivalent to abandoning all the work
in flight anyway, but this means there's a fighting chance the node will
recover quickly enough to return a "healthy" status.
2023-08-07 22:17:12 -05:00
Matt Godbolt b23e60460e Remove apparently deprecated test class in favour of the new one (#5306) 2023-07-30 19:01:16 -05:00
Patrick Quist 9b983d6965 Load and show creation_date of shortlink (#5236) 2023-07-17 23:36:36 +02:00
Jorge Lopez a90dfab5f5 Add a line break before kill (#5258)
A fix for
https://github.com/compiler-explorer/compiler-explorer/issues/5233
2023-07-15 10:37:01 -05:00
Matt Godbolt 87024e2239 Bump latest deps (#5252) 2023-07-10 21:31:04 -05:00
Patrick Quist d1b75456ac Library code filter fix (#5204) 2023-07-03 21:32:30 +02:00
Jeremy Rifkin 4260313e13 Common utilities and type work (#5200)
This PR refactors some common utilities out of lib/ and into shared/ and
eliminates some use of underscore.js, as well as general type
improvements done along the way.
2023-06-28 20:13:10 -04:00
Jeremy Rifkin 3638f6026c Support control flow graphs for more compilers (#5209)
This PR should make cfg generation available for all clang compilers,
icc, and any compiler whose instructionSet property is x86, arm, or
llvm.
2023-06-28 08:07:33 -04:00
Patrick Quist 40ae2261e0 Headers via conan (#5179) 2023-06-23 12:25:30 +02:00
Jeremy Rifkin d907f34bdc Fix handling when the opt output is truncated (#5189)
Fixes #2984
2023-06-21 21:26:55 -04:00
Guo Ci 7651874a98 add Stack Usage Viewer (#5160)
For #4834
2023-06-19 20:26:15 -05:00
Jeremy Rifkin 59a53d5419 LLVM IR control flow graphs (#5154)
![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/5a2eb341-4f3e-4175-82a3-7cce513ed0ae)

![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/8fe56ced-338a-4c40-bd54-bff5725d9cf5)

Closes #4658
2023-06-17 10:55:24 -04:00
Jeremy Rifkin 4814293ee1 Some quick llvm ir fixes (#5153)
Fixes three issues
- Newlines at start of an ir dump
- Annotations like `!llvm.loop !21`
- Demangling not working
2023-06-17 10:52:51 -04:00
Jeremy Rifkin 60ce06b02f Improve cache handling on the frontend, cache executions on the backend, and improve controls on the exec pane (#5111) 2023-06-11 19:10:30 -04:00
Jeremy Rifkin 34292238c1 Identify unused imports during lint (#5130) 2023-06-11 17:35:59 -04:00
Jeremy Rifkin 10851a1dda LLVM IR pane improvements (#5078)
This PR will add filtering and other output options to the LLVM IR pane


![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/ffc865ea-b3fa-441f-b501-4ec4b68e261f)

![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/936be326-b55e-40cd-ba47-22b121c1acfb)


Closes #5062
Related to #5045
2023-06-11 17:00:53 -04:00
Guo Ci 79bba4c1d1 Add PTX and SASS docs (#5129)
For CUDA C++, add PTX and SASS docs.
2023-06-11 17:00:38 -04:00
fodinaborandMatt Godbolt e28e67d972 Add new "Debug intrinsics" filter. (#5045)
For now, this removes all `llvm.dbg.*` calls from LLVM IR. This is
useful to keep coloring the line correspondence between source and IR,
while not polluting the IR with the debug intrinsics.

Admittedly, I don't have much of a clue of what's going on here, so I
might be missing obvious adaptions (e.g. can we disable this for all
non-LLVM compilers for now somehow?).
Also, not really a Node.JS testing wizard either... 🤷🏼 

Just wanted this really bad for a workshop that's coming up soon ^^

Only tested with my system's default `clang` for now.

Fixes #5044

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-05-22 22:35:01 -05:00
Patrick Quist 079d495757 Compiler overrides (#5001) 2023-05-16 03:53:57 +02:00
Matt Godbolt e5d1d3c146 Fix test, oops 2023-05-04 14:02:10 -05:00
Matt Godbolt 48b5f66d6d Learn to run tests before committing, fool godbolt 2023-04-04 16:30:08 -05:00
Matt Godbolt 28948f55fc Ensure missing split args are treated as [] and not [''] (#4930)
Also means `blah=` will also be `[]` and not `['']`
2023-04-02 19:52:03 -05:00
Patrick Quist 7d192ccde1 add properties and test for cewrapper (#4761) 2023-03-18 11:46:27 +01:00
Matt Godbolt 2b6500203e Update to latest AWS SDK (#4818)
We're not using the new `send` functionality, but this gets everything
running and tests passing. It has _not_ been tested against real AWS
yet. That's next. I might move stuff over to the new `send` API, but
also I might not if it's just working.
2023-03-07 18:10:56 -06:00
Matt Godbolt 8cb8f6ff84 Update to yaml and drop some unneeded deps (#4811)
Also add some tests
2023-03-02 19:02:57 -06:00
Mats Jun LarsenandMatt Godbolt 633eb82d18 Transition to ECMAScript Modules (#4780)
Makes the Compiler Explorer app, and all the tooling ESM compatible.
Things that have been done:

1. The package.json has `type: module` now
2. All relative imports have a .js ending
3. All directory imports are now directory/index.js to comply with ESM
standards
4. Dependency node-graceful is now imported into tree, because the
package is broken under esm
5. Dependency p-queue has been bumped to 7.x with ESM support
6. Dependency profanities has been bumped to 3.x with ESM support
7. Webpack config is now both ESM and CommonJS compatible
8. Non-ESM compatible imports have been rewritten
9. ESLint configuration has been tweaked to not fail on .js imports
10. Mocha is now hacked together and ran with ts-node-esm
11. Webpack is now hacked together and ran with ts-node-esm
12. Webpack config is now ESM compatible, so that it can be used in the
dev server
13. Cypress code still runs commonjs, and has been excluded from the
tsconfig
14. All sinon mock tests have been commented out, because sinon module
mocks do not work with ESModules (because ESModules are immutable)

A lot of tests are now giving warnings/errors to stdout, yet still pass.
Docenizer codegenerator scripts have been updated, but I did not re-run
them, and instead just changed their code.

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-02-27 18:06:38 -06:00