Skip to content

Commit fff5fed

Browse files
authored
Merge pull request #42 from iden3/asm_ci_worker
debug the invalid instruction
2 parents 4f8f547 + 33aa0ce commit fff5fed

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@ jobs:
7070
run: |
7171
set -x
7272
set -e
73+
# To debug the `invalid instruction` crash, we can uncomment this
74+
# code to see the state of the process during the crash.
75+
# IMPORTANT: don't forget to install gdb before uncommenting
76+
#
77+
# cat /proc/cpuinfo
78+
# gdb -q --batch -ex "set disassembly-flavor intel" \
79+
# -ex "run" \
80+
# -ex "bt" \
81+
# -ex "info registers" \
82+
# -ex "x/10i \$pc" \
83+
# --args package/bin/prover testdata/circuit_final.zkey testdata/witness.wtns proof.json public.json
7384
time package/bin/prover testdata/circuit_final.zkey testdata/witness.wtns proof.json public.json
7485
time package/bin/verifier testdata/verification_key.json public.json proof.json
7586
# make a wrong public.json by decrementing the first element by 1
@@ -341,7 +352,7 @@ jobs:
341352
gh release upload ${{ github.event.release.tag_name }} rapidsnark-macOS-arm64-${{ github.ref_name }}.zip
342353
343354
build-apple-x86_64:
344-
runs-on: macos-13
355+
runs-on: macos-15-intel
345356
steps:
346357
- uses: actions/checkout@v4
347358
with:

build_gmp.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,13 @@ build_host()
102102
mkdir "$BUILD_DIR"
103103
cd "$BUILD_DIR"
104104

105-
../configure --prefix="$PACKAGE_DIR" --with-pic --disable-fft &&
105+
# Although the target is named `host`, we still assume that if we build on
106+
# linux x86_64, the binary should work on any linux x86_64. That is why we
107+
# add the --enable-fat flag. Without it, for example, if we cache the build
108+
# artifacts of GMP that were built on one GitHub CI server, we would get a
109+
# crash on another server that does not support instructions from the
110+
# original builder.
111+
../configure --prefix="$PACKAGE_DIR" --with-pic --disable-fft --enable-fat &&
106112
make -j${NPROC} &&
107113
make install
108114

0 commit comments

Comments
 (0)