From 1ad75a50e63e9fd8bed6ccc65b788109002d9dd2 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 21 Apr 2025 22:04:10 +0200 Subject: [PATCH 1/3] Upgrade to `ubuntu-22.04` images. Context: https://github.com/actions/runner-images/issues/11101 --- .github/workflows/main.yml | 2 +- .github/workflows/micronaut.yml | 2 +- .github/workflows/quarkus.yml | 2 +- .github/workflows/reachability-metadata.yml | 2 +- .github/workflows/spring.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e1fdcbe05ad5..ce4ca820ea74 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -92,7 +92,7 @@ permissions: jobs: build-graalvm-linux: name: /${{ matrix.env.PRIMARY }} ${{ matrix.env.GATE_TAGS }} JDK${{ matrix.env.JDK_VERSION }} - runs-on: ${{ matrix.os || 'ubuntu-20.04' }} + runs-on: ${{ matrix.os || 'ubuntu-22.04' }} timeout-minutes: 60 strategy: fail-fast: false diff --git a/.github/workflows/micronaut.yml b/.github/workflows/micronaut.yml index 819fc5dde953..9d94c41bc082 100644 --- a/.github/workflows/micronaut.yml +++ b/.github/workflows/micronaut.yml @@ -63,7 +63,7 @@ permissions: jobs: build-graalvm-and-micronaut: name: Native Tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule') steps: - name: Checkout oracle/graal diff --git a/.github/workflows/quarkus.yml b/.github/workflows/quarkus.yml index cce2c4ae7983..87ec5a4c479d 100644 --- a/.github/workflows/quarkus.yml +++ b/.github/workflows/quarkus.yml @@ -67,7 +67,7 @@ jobs: contents: read # to fetch code (actions/checkout) name: Nightly Quarkus and GraalVM build - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule') outputs: matrix: ${{ steps.read.outputs.matrix }} diff --git a/.github/workflows/reachability-metadata.yml b/.github/workflows/reachability-metadata.yml index b19d621f5103..078805ef0f3c 100644 --- a/.github/workflows/reachability-metadata.yml +++ b/.github/workflows/reachability-metadata.yml @@ -61,7 +61,7 @@ permissions: jobs: build-graalvm-and-populate-matrix: name: Build GraalVM and populate matrix - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule') outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} diff --git a/.github/workflows/spring.yml b/.github/workflows/spring.yml index 458b446fdbda..9dfcc28b41ce 100644 --- a/.github/workflows/spring.yml +++ b/.github/workflows/spring.yml @@ -61,7 +61,7 @@ permissions: jobs: build-graalvm-and-spring: name: Native Tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule') steps: - name: Checkout oracle/graal From 136bac805ab9272755486a1a09e11c6ed0b04e36 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 21 Apr 2025 22:06:44 +0200 Subject: [PATCH 2/3] Pin version of `actions/download-artifact`. --- .github/workflows/ni-layers.yml | 2 +- .github/workflows/quarkus.yml | 4 ++-- .github/workflows/reachability-metadata.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ni-layers.yml b/.github/workflows/ni-layers.yml index 92447cfd1b29..cf7854f6e7d9 100644 --- a/.github/workflows/ni-layers.yml +++ b/.github/workflows/ni-layers.yml @@ -105,7 +105,7 @@ jobs: - name: Checkout oracle/graal uses: actions/checkout@v4 - name: Download GraalVM JDK build - uses: actions/download-artifact@v4 + uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 with: name: graalvm path: . diff --git a/.github/workflows/quarkus.yml b/.github/workflows/quarkus.yml index 87ec5a4c479d..2c1c87c6a15c 100644 --- a/.github/workflows/quarkus.yml +++ b/.github/workflows/quarkus.yml @@ -133,7 +133,7 @@ jobs: steps: - name: Download GraalVM JDK build if: startsWith(matrix.os-name, 'ubuntu') - uses: actions/download-artifact@v4 + uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 with: name: graalvm path: . @@ -154,7 +154,7 @@ jobs: run: ${QUARKUS_PATH}/.github/ci-prerequisites.sh - name: Download Maven Repo if: startsWith(matrix.os-name, 'ubuntu') - uses: actions/download-artifact@v4 + uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 with: name: maven-repo path: . diff --git a/.github/workflows/reachability-metadata.yml b/.github/workflows/reachability-metadata.yml index 078805ef0f3c..451daf4a201a 100644 --- a/.github/workflows/reachability-metadata.yml +++ b/.github/workflows/reachability-metadata.yml @@ -110,7 +110,7 @@ jobs: with: repository: oracle/graalvm-reachability-metadata - name: Download GraalVM JDK build - uses: actions/download-artifact@v4 + uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 with: name: graalvm path: . From 6b746bca649f1244bc912ca41b6924fba104fddb Mon Sep 17 00:00:00 2001 From: Roland Schatz Date: Tue, 22 Apr 2025 10:50:51 +0200 Subject: [PATCH 3/3] Remove sulong dynLink/cycle test. This test is testing the loading order for DSOs with cyclic dependencies. In glibc 2.35, the loading order changed. That means this test doesn't work anymore on systems with glibc >= 2.35, since the reference executable now outputs a different order than Sulong. Since glibc doesn't considers this order stable, it doesn't make much sense to test for it in Sulong. --- .../dynLink/cycle/Makefile | 53 ------------------- .../dynLink/cycle/a.c | 35 ------------ .../dynLink/cycle/b.c | 35 ------------ .../dynLink/cycle/c.c | 35 ------------ .../dynLink/cycle/main.c | 47 ---------------- 5 files changed, 205 deletions(-) delete mode 100644 sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/Makefile delete mode 100644 sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/a.c delete mode 100644 sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/b.c delete mode 100644 sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/c.c delete mode 100644 sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/main.c diff --git a/sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/Makefile b/sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/Makefile deleted file mode 100644 index eac23d046dad..000000000000 --- a/sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without modification, are -# permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, this list of -# conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, this list of -# conditions and the following disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# 3. Neither the name of the copyright holder nor the names of its contributors may be used to -# endorse or promote products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS -# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -# OF THE POSSIBILITY OF SUCH DAMAGE. -# -QUIETLY$(MX_VERBOSE) = @ - -default: dynLink/cycle/ref.bc - -# fake libB without dependecy to produce a cycle -fake/libB$(SO_EXT): dynLink/cycle/b.c dynLink/cycle/Makefile - @mkdir -p $(shell dirname $@) - $(QUIETLY) $(CLANG) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SO_LDFLAGS) -fPIC -shared -o $@ $< - -dynLink/cycle/libA$(SO_EXT): dynLink/cycle/a.c dynLink/cycle/Makefile fake/libB$(SO_EXT) - @mkdir -p $(shell dirname $@) - $(QUIETLY) $(CLANG) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SO_LDFLAGS) -fPIC -shared -rpath $(ORIGIN_TOKEN) -Lfake -lB -o $@ $< - -dynLink/cycle/libB$(SO_EXT): dynLink/cycle/b.c dynLink/cycle/Makefile dynLink/cycle/libC$(SO_EXT) - @mkdir -p $(shell dirname $@) - $(QUIETLY) $(CLANG) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SO_LDFLAGS) -fPIC -shared -rpath $(ORIGIN_TOKEN) -LdynLink/cycle -Lfake -lC -o $@ $< - -dynLink/cycle/libC$(SO_EXT): dynLink/cycle/c.c dynLink/cycle/Makefile dynLink/cycle/libA$(SO_EXT) - @mkdir -p $(shell dirname $@) - $(QUIETLY) $(CLANG) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SO_LDFLAGS) -fPIC -shared -rpath $(ORIGIN_TOKEN) -LdynLink/cycle -Lfake -lA -o $@ $< - -dynLink/cycle/ref.out: dynLink/cycle/main.c dynLink/cycle/Makefile dynLink/cycle/libA$(SO_EXT) dynLink/cycle/libB$(SO_EXT) - @mkdir -p $(shell dirname $@) - $(QUIETLY) $(CLANG) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(ORIGIN_TOKEN) -LdynLink/cycle -lA -lB -o $@ $< diff --git a/sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/a.c b/sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/a.c deleted file mode 100644 index 6ce3a616f606..000000000000 --- a/sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/a.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2020, Oracle and/or its affiliates. - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other materials provided - * with the distribution. - * - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to - * endorse or promote products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#include -#include - -__attribute__((constructor)) static void beginA(void) { - printf("ctor a\n"); -} \ No newline at end of file diff --git a/sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/b.c b/sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/b.c deleted file mode 100644 index ef32eb1ffe13..000000000000 --- a/sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/b.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2020, Oracle and/or its affiliates. - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other materials provided - * with the distribution. - * - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to - * endorse or promote products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#include -#include - -__attribute__((constructor)) static void beginB(void) { - printf("ctor b\n"); -} diff --git a/sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/c.c b/sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/c.c deleted file mode 100644 index 7605553cc79f..000000000000 --- a/sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/c.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2020, Oracle and/or its affiliates. - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other materials provided - * with the distribution. - * - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to - * endorse or promote products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#include -#include - -__attribute__((constructor)) static void beginC(void) { - printf("ctor c\n"); -} diff --git a/sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/main.c b/sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/main.c deleted file mode 100644 index f6f3a101d9d0..000000000000 --- a/sulong/tests/com.oracle.truffle.llvm.tests.linker.native/dynLink/cycle/main.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2020, Oracle and/or its affiliates. - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other materials provided - * with the distribution. - * - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to - * endorse or promote products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#include -#include - -/** - * Tests the initialization order in the presents of symlinks. libD is a symlink to libA. - * This test ensures that we 1) do not initialize libA twice, and 2) that we initialize the - * libraries in the right order (A, C, B). - * - *
- *   main ------------------------v
- *    |         v--------------- libA
- *    `-----> libB --> libC ------^
- * 
- */ -int main() { - printf("Main\n"); - return 0; -}