Skip to content

Commit 808462c

Browse files
authored
Fix trailing null bytes in JSON output files; Fix gmp build on macOS 26
2 parents 9983837 + 35da645 commit 808462c

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ jobs:
242242
gh release upload ${{ github.event.release.tag_name }} rapidsnark-linux-arm64-${{ github.ref_name }}.zip
243243
244244
build-apple-arm64:
245-
runs-on: macos-14
245+
runs-on: macos-15
246246
steps:
247247
- uses: actions/checkout@v4
248248
with:

build_gmp.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ build_macos_arch()
322322
cd "$BUILD_DIR"
323323
../configure --prefix="${PACKAGE_DIR}" \
324324
CC="$(xcrun --sdk macosx --find clang)" \
325+
CPP_FOR_BUILD="$(xcrun --sdk macosx --find clang) -E" \
325326
CFLAGS="-O3 -isysroot $(xcrun --sdk macosx --show-sdk-path) ${ARCH_FLAGS} -fvisibility=hidden -mmacos-version-min=14.0" \
326327
LDFLAGS="" \
327328
--host "${ARCH}-apple-darwin" --disable-assembly --enable-static --disable-shared --with-pic &&

src/prover.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,9 @@ groth16_prover_prove(
364364
stringPublic.length(), public_size,
365365
"Required");
366366

367+
*proof_size = stringProof.length();
368+
*public_size = stringPublic.length();
369+
367370
std::strncpy(proof_buffer, stringProof.c_str(), *proof_size);
368371
std::strncpy(public_buffer, stringPublic.c_str(), *public_size);
369372

0 commit comments

Comments
 (0)