Skip to content

Commit 9994ecd

Browse files
authored
Fix miscompilation / liveness errors for string operations (#3960)
1 parent 768b131 commit 9994ecd

File tree

5 files changed

+543
-180
lines changed

5 files changed

+543
-180
lines changed

.github/workflows/build.yml

+41-21
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ jobs:
178178
env:
179179
J: "3"
180180
run_testsuite: "true"
181-
expected_fail: "${{matrix.expected_fail == true}}"
182181

183182
steps:
184183
- name: Checkout the Flambda backend repo
@@ -200,12 +199,14 @@ jobs:
200199
if: matrix.os == 'macos-latest'
201200
run: HOMEBREW_NO_INSTALL_CLEANUP=TRUE brew install autoconf
202201

202+
# NB. The "rev" number in the cache key below must be updated each time
203+
# the patch file is changed!
203204
- name: Cache OCaml 4.14, dune and menhir
204205
uses: actions/cache@v4
205206
id: cache
206207
with:
207208
path: ${{ github.workspace }}/ocaml-414/_install
208-
key: ${{ matrix.os }}-cache-ocaml-414-patched-dune-3152-menhir-20231231
209+
key: ${{ matrix.os }}-cache-ocaml-414-patched-dune-3152-menhir-20231231-rev13
209210

210211
- name: Checkout OCaml 4.14
211212
uses: actions/checkout@master
@@ -285,14 +286,23 @@ jobs:
285286
--with-dune=$GITHUB_WORKSPACE/ocaml-414/_install/bin/dune \
286287
${{ matrix.config }}
287288
288-
- name: Setup for saving core files (not for macOS at the moment)
289+
- name: Setup for saving core files (not for macOS)
289290
if: matrix.os != 'macos-latest'
290291
run: |
291292
sudo mkdir /cores
292293
sudo chmod 777 /cores
293294
# Core filenames will be of the form executable.pid.timestamp:
294295
sudo bash -c 'echo "/cores/%e.%p.%t" > /proc/sys/kernel/core_pattern'
295296
297+
- name: Setup for saving core files (macOS)
298+
if: matrix.os == 'macos-latest'
299+
run: |
300+
sudo chmod 1777 /cores
301+
sudo sysctl kern.coredump=1
302+
/usr/libexec/PlistBuddy -c "Add :com.apple.security.get-task-allow bool true" /tmp/core.entitlements
303+
codesign -s - -f --entitlements /tmp/core.entitlements $GITHUB_WORKSPACE/ocaml-414/_install/bin/ocamlc.opt
304+
codesign -s - -f --entitlements /tmp/core.entitlements $GITHUB_WORKSPACE/ocaml-414/_install/bin/ocamlopt.opt
305+
296306
- name: Build, install and test Flambda backend
297307
working-directory: flambda_backend
298308
run: |
@@ -313,25 +323,35 @@ jobs:
313323
run: |
314324
PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH make check_all_arches
315325
316-
# CR-soon xclerc for xclerc: re-enable the "upload-artifact" action
317-
# (they are failing @4 because the names are not unique)
318-
# - uses: actions/upload-artifact@v4
319-
# if: ${{ failure() }} && matrix.os != 'macos-latest'
320-
# with:
321-
# name: cores-${{ github.sha }}
322-
# path: /cores
323-
#
324-
# - uses: actions/upload-artifact@v4
325-
# if: ${{ failure() }} && matrix.os != 'macos-latest'
326-
# with:
327-
# name: _build-${{ github.sha }}
328-
# path: $GITHUB_WORKSPACE/_build
326+
- uses: actions/upload-artifact@v4
327+
if: ${{ failure() }}
328+
with:
329+
name: cores-${{ github.sha }}-${{ github.run_id }}-${{ matrix.name }}
330+
path: /cores
331+
332+
# - uses: actions/upload-artifact@v4
333+
# if: ${{ failure() }}
334+
# with:
335+
# name: ocaml-414-${{ github.sha }}-${{ github.run_id }}-${{ matrix.name }}
336+
# path: ${{ github.workspace }}/ocaml-414/_install
337+
338+
- uses: actions/upload-artifact@v4
339+
if: ${{ failure() }} && matrix.os == 'macos-latest'
340+
with:
341+
name: DiagnosticReports-${{ github.sha }}-${{ github.run_id }}-${{ matrix.name }}
342+
path: /Users/runner/Library/Logs/DiagnosticReports
343+
344+
# - uses: actions/upload-artifact@v4
345+
# if: ${{ failure() }}
346+
# with:
347+
# name: _build-${{ github.sha }}-${{ github.run_id }}-${{ matrix.name }}
348+
# path: ${{ github.workspace }}/flambda_backend/_build
329349
#
330-
# - uses: actions/upload-artifact@v4
331-
# if: ${{ failure() }} && matrix.os != 'macos-latest'
332-
# with:
333-
# name: _runtest-${{ github.sha }}
334-
# path: $GITHUB_WORKSPACE/_runtest
350+
# - uses: actions/upload-artifact@v4
351+
# if: ${{ failure() }}
352+
# with:
353+
# name: _runtest-${{ github.sha }}-${{ github.run_id }}-${{ matrix.name }}
354+
# path: ${{ github.workspace }}/flambda_backend/_runtest
335355

336356
concurrency:
337357
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}

0 commit comments

Comments
 (0)