Commit Graph

10219 Commits

Author SHA1 Message Date
Matt Godbolt
8129a34e55 Remove redundant comment
The function name collectReferencedFunctions() makes the purpose clear,
so the comment 'Pass 1: Collect all referenced functions' is unnecessary.
gh-15086
2025-06-07 15:23:13 -05:00
Matt Godbolt
fdec1bca68 Merge remote-tracking branch 'origin/main' into claude/fix-1648 gh-15084 2025-06-07 15:20:35 -05:00
Matt Godbolt
70ab5fc245 Fix statically linked libgcc functions being filtered out
Implements a two-pass solution for issue #1648 where statically linked
library functions (like __divdc3) were incorrectly filtered out even
when directly called by user code.

Changes:
- Add collectReferencedFunctions() method that scans assembly for function calls
- Modify binary filtering logic to keep functions that are either:
  - User functions (existing behavior), OR
  - Referenced by user functions (new behavior)
- Add comprehensive test case with __divdc3 usage

The fix ensures that functions like __divdc3 are now visible when called
from user code, while still filtering out unreferenced library functions
to avoid excessive output.

Fixes #1648

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
gh-15082
2025-06-07 15:11:35 -05:00
Matt Godbolt
ada0398184 Add a GH bug hunter command gh-15081 2025-06-07 15:01:32 -05:00
Matt Godbolt
3d9c857028 Add a GH bug hunter command 2025-06-07 15:01:13 -05:00
Matt Godbolt
2dd16bc02a Add sentry hunting commands (#7773)
FAO @partouf adds two new `/` commands in claude, seems to work quite
well. Needs the sentry MCP which is pretty easy to install. Will do a
github one too
gh-15074
2025-06-07 09:12:57 -05:00
Matt Godbolt
c532d00f45 Fix null reference error in CFG view birds-eye zoom (#7768)
## Summary

Fixes COMPILER-EXPLORER-BY7: TypeError accessing 'blocks' property of
undefined layout when clicking zoom-out button before any CFG has been
generated.

- Uses modern TypeScript optional chaining for null-safe access 
- Prevents crashes when users click zoom-out before compiling code

## Test plan

- [ ] Load CFG view pane
- [ ] Click zoom-out button before generating any CFG (should not crash)
- [ ] Generate a CFG and verify zoom-out still works as expected

🤖 Generated with [Claude Code](https://claude.ai/code)
gh-15068
2025-06-06 17:15:21 -05:00
Marc Poulhiès
2e5c3d1f53 Add 23 cross GCC and 2 natives GCC 13.4 (#7769)
fixes https://github.com/compiler-explorer/compiler-explorer/issues/7728
gh-15065
2025-06-07 00:09:47 +02:00
Matt Godbolt
f8974b4f5f Fix Rust hexadecimal literal syntax highlighting with underscores (#7766)
## Summary
- Fixes syntax highlighting issue where Rust hex literals with
underscores after hex letters (like `0x01_02_0a_0b`) would lose
highlighting after the underscore
- Created custom Rust language mode (`rustp`) that patches Monaco's
built-in tokenizer
- Filed upstream issue with Monaco Editor:
https://github.com/microsoft/monaco-editor/issues/4917

## Test plan
- [x] Verified fix works locally with test cases like `0x01_02_0a_0b`,
`0xFF_AA_BB_CC`, etc.
- [x] Confirmed all existing tests pass
- [x] Checked that TypeScript compilation and linting pass

🤖 Generated with [Claude Code](https://claude.ai/code)

---------

Co-authored-by: Claude <noreply@anthropic.com>
gh-15054
2025-06-06 16:21:27 -05:00
Matt Godbolt
d0c16246d3 Fix null reference error in findConfig when URL parsing fails (#7763)
## Summary

Fixes `TypeError: Cannot read properties of undefined (reading
'content')` in `findConfig()` when URL parsing fails and no saved state
is available.

## Root Cause

This error occurs when:
1. `url.deserialiseState()` throws an exception due to
malformed/corrupted URLs
2. No saved state exists in localStorage
(`sessionThenLocalStorage.get('gl', null)` returns `null`)
3. Code attempts to access `config.content` when `config` is still
`undefined`

The error happens legitimately from truncated URLs, corrupted bookmarks,
or URL shortener issues.

## Changes

- Changed `if (!config.content || config.content.length === 0)` to use
optional chaining: `if (!config?.content || config.content?.length ===
0)`
- This gracefully handles the null/undefined case and falls back to
default config as intended

## Impact

- Maintains existing user experience (fallback to default config when
URL parsing fails)
- Prevents crash with 1430+ reported occurrences
- No behavioral changes for valid URLs

Fixes COMPILER-EXPLORER-DE3

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
gh-15041
2025-06-06 14:28:56 -05:00
Matt Godbolt
7a7622094b Fix null compiler error in diff pane (#7762)
## Summary
- Fix TypeError when diff pane receives execution results before
compiler is registered
- Add null check to prevent crash and gracefully handle race condition

## Description
This PR fixes issue #7761 where a `TypeError: Cannot set properties of
null (setting 'compiler')` occurs in the diff pane.

### The Problem
A race condition can occur where:
1. An executor pane resends its results (e.g., during layout
initialization)
2. The diff pane receives the `executeResult` event
3. The diff pane tries to update its state, but `this.compiler` is still
null
4. The code crashes trying to set `this.compiler.compiler = compiler`

### The Solution
Add a null check in the `update` method of `DiffStateObject`. If
`this.compiler` is null, we simply ignore the update and return false.
This is safe because:
- When `onCompiler` is eventually called, it will properly initialize
the compiler
- `onCompiler` calls `onDiffSelect()` which calls
`requestResendResult()`
- This will re-request the compilation/execution results
- By then, the compiler will be properly initialized and the update will
succeed

### Testing
- TypeScript checks pass
- Linting passes
- The fix prevents the crash while maintaining correct behavior

Fixes #7761

🤖 Generated with [Claude Code](https://claude.ai/code)

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
gh-15038
2025-06-06 12:51:12 -05:00
Matt Godbolt
f3ba8ebe29 New patrons! Thank you! gh-15030 2025-06-05 14:33:31 -05:00
Matt Godbolt
917c7f9dca Monthly upgrade of all the things (#7758)
Tested with a local run and a poke in the UI
gh-15024
2025-06-04 09:01:27 -05:00
dependabot[bot]
d0f474e80c Bump tar-fs from 1.16.4 to 1.16.5 (#7755)
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 1.16.4 to
1.16.5.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/mafintosh/tar-fs/commits">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tar-fs&package-manager=npm_and_yarn&previous-version=1.16.4&new-version=1.16.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/compiler-explorer/compiler-explorer/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
gh-15019
2025-06-03 09:24:26 -05:00
github-actions[bot]
82887a4b65 [bot] Update browsers list (#7750)
Co-authored-by: Compiler Explorer Bot <mattgodbolt@users.noreply.github.com>
gh-15010
2025-06-02 06:10:32 +00:00
Jeremy Rifkin
df6791ba53 Fix motd close button color on dark mode (#7753)
A hack :)
gh-15009
2025-06-01 22:17:51 -05:00
Jeremy Rifkin
2fd27067f4 Fix motd close button for community ads (#7752)
Fixes a subtle breakage from the bootstrap migration: The motd close
button works for update/motds but not community ads. This PR cleans up
the duplicate code and subsequent deviation.
gh-15008
2025-06-01 21:49:11 -05:00
Matt Godbolt
86f37b0ada Fix js gh-14996 2025-05-31 09:08:46 -05:00
Partouf
a6dad502d4 hotfix msvc execution gh-14995 2025-05-31 15:06:18 +02:00
Partouf
218d24c43f remove msvc compiler that we dont have 2025-05-31 15:05:36 +02:00
Matt Godbolt
4f4cb67cfe Use an actual released compiler for vc 17.11 (#7748)
Closes #7745. Hopefully

I followed
https://github.com/compiler-explorer/infra/blob/main/docs/adding_msvc_compilers.md
with an official 17.11.6 compiler
gh-14993
2025-05-30 17:32:02 -05:00
Patrick Quist
cd06c2d286 Add Rust crate ahash v0.8.12 (#7723)
This PR adds the Rust crate **ahash** version 0.8.12 to Compiler
Explorer.

Related PR: https://github.com/compiler-explorer/infra/pull/1633
gh-14989
2025-05-30 18:27:43 +02:00
Quinton Miller
984b47e666 Update Crystal to 1.16.3 (#7736) gh-14988 2025-05-30 09:27:18 -05:00
Alfredo Correa
399a72a773 Add bmpi3 (#7735)
Proposing to add the B-MPI3 library to the live site.
https://gitlab.com/correaa/boost-mpi3

Followed the steps as best as I could in based on other gitlab type
libraries (bmulti)

Feedback on improving the hooks and the organizations of files in the
repository is welcome.
The goal is to include the library by doing
#include<mpi3/communicator.hpp>.
gh-14987
2025-05-30 09:26:45 -05:00
Rob Parolin
157662eb31 [mojo-lang] Fixing LLVM IR panel due to calling the mojo compiler with incorrect args. (#7716)
This PR fixes the LLVM IR output for the Mojo compiler integration,
ensuring the LLVM IR panel works correctly and no longer shows "Internal
error; unable to open output path" errors.
gh-14986
2025-05-30 07:48:28 -05:00
narpfel
20bae12039 Add Miri tool for Rust (#7718)
Resolves
https://github.com/compiler-explorer/compiler-explorer/issues/2563.

`misc-builder` PR:
https://github.com/compiler-explorer/misc-builder/pull/112
`compiler-workflows` PR:
https://github.com/compiler-explorer/compiler-workflows/pull/36
`infra` PR: https://github.com/compiler-explorer/infra/pull/1631

Screenshot:

![miri-tool](https://github.com/user-attachments/assets/d866bb42-a242-445b-be52-6fd0b3c877bb)
gh-14985
2025-05-30 07:17:01 -05:00
Patrick Quist
abe7d9c836 fixes for windows execution (#7740) gh-14980 2025-05-30 04:53:20 +02:00
T
3859bdda5a Add zig 0.14.1 and make it the default zig compiler (#7737)
zig `0.14.1` released on 2025-05-21.

The corresponding infra PR:
https://github.com/compiler-explorer/infra/pull/1639
gh-14976
2025-05-29 11:01:22 -05:00
Partouf
c473db498c get rid of cewrapper error gh-14972 2025-05-28 16:47:28 +02:00
Partouf
2e0549b3fb more fixes gh-14971 2025-05-28 15:21:02 +02:00
Partouf
d16d717220 hotfix windows gh-14970 2025-05-28 14:49:51 +02:00
Partouf
de3e34bda8 windows hotfix gh-14969 2025-05-28 14:00:09 +02:00
Patrick Quist
2e76639163 Windows library support (#7554)
Huray
gh-14967
2025-05-28 10:50:26 +02:00
Partouf
50e504d304 golang prop fixes gh-14966 2025-05-28 10:50:12 +02:00
Matt Godbolt
1831edc227 Refactor startup to catch exceptions where they're thrown. (#7734)
Fixes issues with missing components (e.g. from beta, 'explain')

The issue was that the exceptions are thrown in `initLayout`, not in the
constructor.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
gh-14959
2025-05-27 12:43:56 -05:00
Matt Godbolt
e3ff68f4dd Fix Vitest timeout deprecation warnings (#7733)
## Summary
This PR updates test files to use the new Vitest timeout syntax,
resolving deprecation warnings.

## Changes
- Updated `test/packager-tests.ts` to pass timeout as a number instead
of `{timeout: 5000}`
- Updated `test/filter-tests.ts` to pass timeout as a number instead of
`{timeout: 10000}`

## Details
Vitest now expects timeouts to be passed directly as a number as the
third parameter to `it()`, rather than as an object. This change updates
all occurrences to use the new syntax.

## Test plan
- [x] All existing tests continue to pass
- [x] No deprecation warnings are shown when running tests
- [x] Linter and type checks pass

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
gh-14952
2025-05-27 12:17:44 -05:00
Matt Godbolt
d27d59fc1e Add DynamoDB support for Google URL shortener (#7724)
## Summary
- Add DynamoDB support to Google URL shortener to check in preference to goo.gl itself (which will be going away)
- Update ShortLinkResolver to accept AWS properties and use DynamoDB table `goo-gl-links`
- First check DynamoDB for fragment lookup before falling back to Google URL shortener (for now)
- Refactor resolve method to use async/await instead of raw promises for better readability
- Add awsProps to ServerDependencies and pass through component hierarchy
- Configure googleLinksDynamoTable property in AWS config files (defaults to empty)

## Implementation Details
- When `googleLinksDynamoTable` property is configured, `ShortLinkResolver` creates a DynamoDB client
- DynamoDB table uses `fragment` as the key and stores `expanded_url`
- Maintains backwards compatibility by falling back to Google URL (for now) shortener if DynamoDB is not configured or lookup fails
- Google URL shortener fallback will be removed in August 2025 when the service shuts down

## Test plan
- [x] All existing tests pass
- [x] TypeScript compilation succeeds
- [x] Linting passes
- [x] Updated tests to accommodate new awsProps parameter
- [x] Verify fallback to Google URL shortener when DynamoDB not
configured
- [x] Manual testing

🤖 Generated with [Claude Code](https://claude.ai/code)

---------

Co-authored-by: Claude <noreply@anthropic.com>
gh-14948
2025-05-26 16:24:04 -05:00
Marc Poulhiès
2777ed482d Add GCC 14.3 (#7725)
fixes compiler-explorer/compiler-explorer#7693
gh-14944
2025-05-26 22:10:40 +02:00
Spencer Fricke
c2a02c7d8f Update Khronos Logos (#7726) gh-14932 2025-05-25 16:12:33 +00:00
Patrick Quist
7f393e6763 Refactor objdump execution to use BaseObjdumper class (#7715) gh-14928 2025-05-25 17:21:01 +02:00
Patrick Quist
b99653804c Update SupportedEmulators.md gh-14916 2025-05-24 19:29:25 +02:00
Patrick Quist
6fb3ab38e7 Add Game Boy emulator support using WasmBoy (#7717) gh-14915 2025-05-24 18:43:41 +02:00
narpfel
91a2d58aa2 Make 2024 the default edition for Rust >= 1.85 (#7649)
Resolves #7472.
gh-14897
2025-05-23 03:01:26 +02:00
Rob Parolin
f7f5ddc32c [Mojo] Removing 25.3.0 release from live site. (#7711)
Removing the Mojo 25.3.0 release from the live site due to mismatch of
command lines for dumping llvm-ir and asm. The nightly functions
correctly.
gh-14884
2025-05-22 11:30:57 -05:00
Matt Godbolt
8772251b40 Fix up mojo config. 25.3 fails; so made nightly the default. cc @rparolin re: #7692 gh-14881 2025-05-21 20:19:23 -05:00
Matt Godbolt
d2b46a7825 Handle case when the tool goes away 2025-05-21 20:12:12 -05:00
Matt Godbolt
8106ccdad9 Fix static URL double slash issue in CDN asset paths (#7709)
## Summary
Fix production CDN loading issues where URLs like
`https://static.ce-cdn.net//vendor.v57...css` (double slash) were being
generated when the `staticUrl` config has a trailing slash.

## Root Cause
PR #7681 refactored static asset handling and replaced
`urljoin(staticRoot, path)` with `${staticRoot}/${path}` string
interpolation, losing URL normalization that `urljoin` provides.

## Changes
- Replace string interpolation with `urljoin()` in
`createDefaultPugRequireHandler()`
- Add comprehensive tests covering all trailing slash scenarios
- Maintain full backward compatibility with existing configurations

## Test plan
- [x] All existing tests pass
- [x] Added 4 new test cases for static URL handling with various slash
scenarios
- [x] Verified TypeScript compilation and linting
- [x] Tested production CDN scenario where
`staticUrl=https://static.ce-cdn.net/`

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
gh-14880
2025-05-21 17:27:06 -05:00
jmuddnv
64f9a94d9c Changes for NVIDIA HPC SDK 25.5 (#7706)
Add nvc 25.5 to etc/config/c.amazon.properties
       Add nvc++ 25.5 to etc/config/c++.amazon.properties
       Add nvfortran 25.5 to etc/config/fortran.amazon.properties
       Add CUDA 12.9 to etc/config/cuda.amazon.properties
gh-14877
2025-05-21 16:21:26 -05:00
Matt Godbolt
a5903c0867 Fix issues introduced in #7681 (#7707)
- healthcheck got accidentally unwired
- CSP was accidentially "done" (was a TODO)
gh-14876
2025-05-21 16:20:51 -05:00
David Spickett
5eb02b5737 Assembly: Add new GNU AS versions for Arm and AArch64 (#7705)
Follow up to
https://github.com/compiler-explorer/compiler-explorer/pull/7540.

Fixes #7528

Last time I tried this, the 14.2.0 GCC builds were still using 2.38 for
Arm and AArch64, now there are 15.1.0 builds and those both use 2.44.

Which I have confirmed locally:
$
/opt/compiler-explorer/arm64/gcc-15.1.0/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-as
--version
GNU assembler (GNU Binutils) 2.44

$
/opt/compiler-explorer/arm/gcc-15.1.0/arm-unknown-linux-gnueabihf/bin/arm-unknown-linux-gnueabihf-as
--version
GNU assembler (GNU Binutils) 2.44

While I'm here, I added 2.38 to Arm since it was missing. From the GCC
13.2.0 build:
$
/opt/compiler-explorer/arm/gcc-13.2.0/arm-unknown-linux-gnueabihf/bin/arm-unknown-linux-gnueabihf-as
--version
GNU assembler (GNU Binutils) 2.38
gh-14872
2025-05-21 13:54:04 -05:00