Skip to content

Commit 12c9243

Browse files
committed
Fix miscompilation / liveness errors for string operations
1 parent b04e920 commit 12c9243

File tree

5 files changed

+566
-179
lines changed

5 files changed

+566
-179
lines changed

.github/workflows/build.yml

+41-20
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,14 @@ jobs:
200200
if: matrix.os == 'macos-latest'
201201
run: HOMEBREW_NO_INSTALL_CLEANUP=TRUE brew install autoconf
202202

203+
# NB. The "rev" number in the cache key below must be updated each time
204+
# the patch file is changed!
203205
- name: Cache OCaml 4.14, dune and menhir
204206
uses: actions/cache@v4
205207
id: cache
206208
with:
207209
path: ${{ github.workspace }}/ocaml-414/_install
208-
key: ${{ matrix.os }}-cache-ocaml-414-patched-dune-3152-menhir-20231231
210+
key: ${{ matrix.os }}-cache-ocaml-414-patched-dune-3152-menhir-20231231-rev13
209211

210212
- name: Checkout OCaml 4.14
211213
uses: actions/checkout@master
@@ -285,14 +287,23 @@ jobs:
285287
--with-dune=$GITHUB_WORKSPACE/ocaml-414/_install/bin/dune \
286288
${{ matrix.config }}
287289
288-
- name: Setup for saving core files (not for macOS at the moment)
290+
- name: Setup for saving core files (not for macOS)
289291
if: matrix.os != 'macos-latest'
290292
run: |
291293
sudo mkdir /cores
292294
sudo chmod 777 /cores
293295
# Core filenames will be of the form executable.pid.timestamp:
294296
sudo bash -c 'echo "/cores/%e.%p.%t" > /proc/sys/kernel/core_pattern'
295297
298+
- name: Setup for saving core files (macOS)
299+
if: matrix.os == 'macos-latest'
300+
run: |
301+
sudo chmod 1777 /cores
302+
sudo sysctl kern.coredump=1
303+
/usr/libexec/PlistBuddy -c "Add :com.apple.security.get-task-allow bool true" /tmp/core.entitlements
304+
codesign -s - -f --entitlements /tmp/core.entitlements $GITHUB_WORKSPACE/ocaml-414/_install/bin/ocamlc.opt
305+
codesign -s - -f --entitlements /tmp/core.entitlements $GITHUB_WORKSPACE/ocaml-414/_install/bin/ocamlopt.opt
306+
296307
- name: Build, install and test Flambda backend
297308
working-directory: flambda_backend
298309
run: |
@@ -313,25 +324,35 @@ jobs:
313324
run: |
314325
PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH make check_all_arches
315326
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
327+
- uses: actions/upload-artifact@v4
328+
if: ${{ failure() }}
329+
with:
330+
name: cores-${{ github.sha }}-${{ github.run_id }}-${{ matrix.name }}
331+
path: /cores
332+
333+
# - uses: actions/upload-artifact@v4
334+
# if: ${{ failure() }}
335+
# with:
336+
# name: ocaml-414-${{ github.sha }}-${{ github.run_id }}-${{ matrix.name }}
337+
# path: ${{ github.workspace }}/ocaml-414/_install
338+
339+
- uses: actions/upload-artifact@v4
340+
if: ${{ failure() }} && matrix.os == 'macos-latest'
341+
with:
342+
name: DiagnosticReports-${{ github.sha }}-${{ github.run_id }}-${{ matrix.name }}
343+
path: /Users/runner/Library/Logs/DiagnosticReports
344+
345+
# - uses: actions/upload-artifact@v4
346+
# if: ${{ failure() }}
347+
# with:
348+
# name: _build-${{ github.sha }}-${{ github.run_id }}-${{ matrix.name }}
349+
# path: ${{ github.workspace }}/flambda_backend/_build
329350
#
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
351+
# - uses: actions/upload-artifact@v4
352+
# if: ${{ failure() }}
353+
# with:
354+
# name: _runtest-${{ github.sha }}-${{ github.run_id }}-${{ matrix.name }}
355+
# path: ${{ github.workspace }}/flambda_backend/_runtest
335356

336357
concurrency:
337358
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}

0 commit comments

Comments
 (0)