Commit Graph

8404 Commits

Author SHA1 Message Date
Luca Boccassi
8d4f4efef0
Merge pull request #4452 from stephan57160/master
Problem: Android helpers have duplicate init code.
2022-10-27 16:09:27 +02:00
Guilloux Stephan (Ubuntu)
6d9c0b8366 Problem: Android helpers have duplicate init code.
Last PRs introduced a duplicate code in Android helper file.
Duplicate "Initialisation" sequence can be observed after the helper functions:

    ########################################################################
    # Initialization

...

    # (Empty string indicates no failure)
    ANDROID_BUILD_FAIL=()

Seen when trying to report last LIBZMQ Android PRs to CZMQ & ZYRE.

Solution: Remove the duplicate code.
2022-10-27 15:46:16 +02:00
Luca Boccassi
1d3ad106ac
Merge pull request #4451 from stephan57160/master
Problem: Android build documentation is outdated.
2022-10-24 23:10:30 +02:00
Luca Boccassi
c1bcb53b12
Merge pull request #4450 from stephan57160/master
Problem: Android docker image is outdated.
2022-10-24 21:32:35 +02:00
Stephan Guilloux (cos)
8742763c04 Problem: Android build documentation to be updated.
Solution: Update Android build documentation.
2022-10-24 21:04:30 +02:00
Stephan Guilloux (cos)
0e887a4037 Problem: Android docker image is outdated.
Solution: Update image.

Added references to tested versions (Ubuntu, debian) and tested NDK.
Carefull though. Android have changed there NDK naming, between 22 and 23.
2022-10-24 20:56:52 +02:00
Luca Boccassi
bfd506094a
Merge pull request #4449 from stephan57160/master
Problem: Android helpers must provide build/clone functions.
2022-10-24 19:58:49 +02:00
Stephan Guilloux (cos)
6fb3a58ca8 Problem: Android helpers must provide build/clone functions.
Reason: Code factorisation & code sharing.

Solution: Create more functions in helper file:
- android_clone_library   # Clone a library source tree.
- android_build_library   # Build a library in its source tree.
2022-10-24 19:32:01 +02:00
Luca Boccassi
3dd2a6964a
Merge pull request #4448 from stephan57160/master
Problem: Android helpers should export more compilation chain related variables
2022-10-24 18:16:28 +02:00
Stephan Guilloux (cos)
69c237efed Problem: Android helpers should export more compilation chain related variables
Among them, CC, LD, CFLAGS, ... could be useful for other tools.

Reason: Many are calculated as "local" to a particular function, which makes
them unavailable outside this helper function.

Solution: Export more variables (CC, LD, CFLAGS, ...).

New exported variables are prefixed with ANDROID_BUILD_xxx.
This naming is expected to avoid any conflicts/problem with other tools:
- ANDROID_BUILD_CC
- ANDROID_BUILD_LD
- ANDROID_BUILD_CFLAGS
- ...
2022-10-24 17:05:20 +02:00
Luca Boccassi
7ff35715ef
Merge pull request #4446 from stephan57160/master
Problem: Android CI build tools does not support LIBSODIUM_ROOT
2022-10-24 14:32:51 +02:00
Stephan Guilloux (cos)
7c3a420be4 Problem: Android CI build tools does not support LIBSODIUM_ROOT
Solution: Implement the current same kind of mechanism as CZMQ & ZYRE, with enhancement.

Enhancement: When required and if LIBSODIUM is not set, the build tool checks
for an already existing clone, close to LIBZMQ. This mechanism is close
to what is done by LIBZMQ/CZMQ/ZYRE for their dependencies.

Additionnaly: Do not copy current source tree to any 'cache' folder. Use
current folder, but make sure all is cleaned before compilation is launched.
This is a lot safer, when building different clones in parrallel...

Enhancement to be reported to CZMQ/ZYRE via ZProject.
2022-10-24 14:10:04 +02:00
Luca Boccassi
34ae0626d4
Merge pull request #4445 from stephan57160/master
Problem: Android CI build helper has no trace function.
2022-10-24 12:08:42 +02:00
Guilloux Stephan (Ubuntu)
e1078f2e7c Problem: Android CI build helper has no trace function.
Solution: Add a trace function.

Requires to move the CI build helper code/check/init/... at the end of
helper file.

This new function is available for (and also used by) build.sh.
Output is like:

    LIBZMQ (x86_64) - Blah ...

To be reported to CZMQ/ZYRE via ZProject.
2022-10-24 10:59:13 +02:00
Stephan Guilloux
2b2fb9c708
Problem: Android NDK 22 download broken since support of NDK 23. (#4444)
* Problem: Android NDK 22 download broken since support of NDK 23.

Due to the PR to support NDK 23.

With NDK 23, the archive file name has changed.
This change is handled by the PR to support NDK23, but now, only 23 and after
are supported.

Also, NDK 23 support introduced a 2nd occurence of the variable
HOST_PLATFORM, with another value. One occurence being exported,
this may confuse next developpers (and it actually confused me).

Solution: Code review

1st occurence is simply dropped, and the algorithm around is changed so that
there is no need of a 'host_platform' kind of stuff.

2nd occurrence is renamed to ANDROID_BUILD_PLATFORM.

Note that 'HOST' is replaced by 'BUILD', as this is the common naming
when talking about the build/compilation machine, when cross compiling.

A dedicated function is created in the helpers, to actually download
the NDK. As this function is made 'public', more checks are performed.

Note:

    To be reported in CZMQ & ZYRE, via ZPROJECT, where NDK is downloaded
    in 2 different files.
2022-10-21 17:36:38 +01:00
Stephan Guilloux
2a7c9efe81
Problem: Android build environment variables need clarifications. (#4443)
* Problem: Android build environment variables need clarifications.

Reason: All are spread and initialized throughout the code.

Solution: Declare, initialize and document environment variables on top of build.sh.

Side effect: This participates to documentation.
2022-10-21 10:55:33 +01:00
Stephan Guilloux
e6e76096bf
Problem: Android APP fails to load ZMQ (ARM64 only) (#4442)
* Problem: Android APP fails to load ZMQ (ARM64 only)

Seen with physical Android devices running ARM64.
Not seen with ARM, X86 or X86_64.

Any Android APP loading ZMQ fails with:
```
[FATAL] Couldn't load library library zmq from jar. Dependency is required!
```

Unpack zyre-android-2.0.1.jar, find libzmq.so for ARM64 and look for missing
symbols:
```
prompt> unzip zyre-android-2.0.1.jar
prompt> cd lib/arm64-v8a
prompt> nm --undefined-only ./libzmq.so | head
                 U __aarch64_ldadd4_acq
                 U __aarch64_ldadd4_acq_rel
                 U __aarch64_ldadd4_rel
                 U __aarch64_ldadd4_relax
                 U __aarch64_ldadd8_acq_rel
                 U __aarch64_ldadd8_relax
                 U __aarch64_swp8_acq
                 U __aarch64_swp8_acq_rel
                 U __aarch64_swp8_rel
                 U __aarch64_swp8_relax
prompt>
```
Some more symbols are missing, but those are relevant for this issue.

OK.
These symbols are present in libc++_shared, but not exported ...:
```
prompt> nm libc++_shared.so | grep aarch64
00000000000ee6d0 t __aarch64_cas1_acq_rel
00000000000ee7a0 t __aarch64_cas8_acq_rel
00000000001028f0 b __aarch64_have_lse_atomics
00000000000ee840 t __aarch64_ldadd4_acq_rel
00000000000ee810 t __aarch64_ldadd4_rel
00000000000ee8a0 t __aarch64_ldadd8_acq_rel
00000000000ee870 t __aarch64_ldadd8_relax
00000000000ee7e0 t __aarch64_swp8_acq_rel
prompt>
```

Issue seen also on the WEB, with GCC & CLANG:
- https://bugzilla.redhat.com/show_bug.cgi?id=1830472
- cea175b838
- ...

Solution: Add `-mno-outline-atomics` to CXXFLAGS (FLUTTER fix).

Additionaly, had to introduce NDK_NUMBER.
This variable is calculated in `android_build_helper.sh`.
It represents the numeric form of NDK_VERSION:
```
  NDK_VERSION          --> NDK_NUMBER
  android-ndk-r25      --> 2500
  android-ndk-r23c     --> 2303
  android-ndk-r22      --> 2200
  android-ndk-r21e     --> 2105
  ... and so on
```

This will help a few other things (NDK download ?).
2022-10-18 10:19:15 +01:00
Luca Boccassi
ec1953e614
Merge pull request #4441 from stephan57160/master
Added RELICENSE statement
2022-10-13 21:36:25 +02:00
Stephan Guilloux (home)
3c50bd6596 Added RELICENSE statement 2022-10-13 21:29:07 +02:00
Luca Boccassi
a3f95107db
Merge pull request #4439 from stephan57160/master
Regression: Android build fails with libsodium.
2022-10-12 10:27:37 +02:00
Stephan Guilloux (cos)
3022e7e099 Regression: Android build fails with libsodium.
Scenario:
```
export CURL=libsodium
cd zyre/builds/android
./ci_build.sh
```

Result:
```
Android (arm) build failed for the following reasons:
  Found no library named libzmq.so libsodium.so
    /home/stephan/git/zproject-android-testing/libzmq/builds/android/prefix/arm/lib/libzmq.so libsodium.so
```

Caused by PR #4437, where the 2nd commit was to fix Sonatype findings.

Lesson learnt: Not always a good idea to add double quotes around variables ...

Solution: Make VERIFY an array, so that Sonatype won't complain.
2022-10-12 02:43:10 +02:00
Luca Boccassi
c19f83027d
Merge pull request #4438 from stephan57160/master
Problem: Android CI build scripts need minor enhancements (traces & cleanup)
2022-10-11 23:32:51 +02:00
Stephan Guilloux (cos)
863b329ccd Problem: Android CI build scripts need minor enhancements (traces & cleanup).
Seen when someone has to relaunch `ci_build.sh` manually, for troubleshooting,
or experiment(s), ci_build.sh stops as libraries are already built.

Solution: Clean more temporary/build folders before build.

Note:

  To be reported in ZYRE/CZMQ via ZProject.

When called from ZYRE/CZMQ, it's difficult to identify which build script is
being executed

Solution: Modify each `echo` trace to show the project name and Android architecture in progress.

Note:

  To be reported in ZYRE/CZMQ via ZProject.
2022-10-11 23:08:08 +02:00
Stephan Guilloux
65b33ebefa
Problem: Android APP fails to load ZMQ since NDK r25.x (#4437)
* Problem: Android APP fails to load ZMQ since NDK r25.x

With the help of the dump of ./configure options (former PR):
```
LIBZMQ (arm) - ./configure options to build 'LIBZMQ':
  > --quiet
  > TOOLCHAIN=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64
  > CC=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang
  > CXX=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang++
  > LD=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/ld
  > AS=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as
  > AR=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
  > RANLIB=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib
  > STRIP=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip
  > CFLAGS= -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE
  > CPPFLAGS= -I/home/stephan/git/zproject-android-testing/libzmq/builds/android/prefix/arm/include
  > CXXFLAGS=
  > LDFLAGS=-L/home/stephan/git/zproject-android-testing/libzmq/builds/android/prefix/arm/lib -L/tmp/android-ndk-r25/sour\
ces/cxx-stl/llvm-libc++/libs/armeabi-v7a
  > LIBS=-lc -ldl -lm -llog -lc++_shared
  > PKG_CONFIG_LIBDIR=/tmp/android-ndk-r25/prebuilt/linux-x86_64/lib/pkgconfig
  > PKG_CONFIG_PATH=/home/stephan/git/zproject-android-testing/libzmq/builds/android/prefix/arm/lib/pkgconfig
  > PKG_CONFIG_SYSROOT_DIR=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/sysroot
  > PKG_CONFIG_DIR=
  > --with-sysroot=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/sysroot
  > --host=arm-linux-androideabi
  > --prefix=/home/stephan/git/zproject-android-testing/libzmq/builds/android/prefix/arm
  > --disable-curve
  > --without-docs
```

We can observe that LDFLAGS has invalid `-L<path_to_libc++_shared.so>`:
```
-L/tmp/android-ndk-r25/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a

```
This path is no more valid, since NDK r25, where one should use LLVM path.

Ok, once this is fixed, ./configure requires also the path to libc.so.
I don't understand why libc.so is now required, actually, but without this, ./configure fails
to build its conftest.

Solution: Fix invalid LDFLAGS.

Notes:

- To be reported to CZMQ/ZYRE via ZPROJECT.

- Tested successfully with Android Emulator (x86 & x86_64).

- Still need some more work, as execution still fails with physical devices (observed on arm64).

- Introduced `ANDROID_STL`, `ANDROID_STL_ROOT` & `ANDROID_LIBC_ROOT`. All are initialized in `android_build_helper.sh`.

- New mechanism **MUST** be compatible with former NDK versions.
2022-10-11 21:40:13 +01:00
Luca Boccassi
1c92300933
Merge pull request #4435 from stephan57160/master
Problem: Android build system needs some debug (./configure options)
2022-10-06 18:34:04 +02:00
Guilloux Stephan (Ubuntu)
426985cb2c TAB -> SPACE 2022-10-06 11:32:57 +02:00
Guilloux Stephan (Ubuntu)
a20527da7f Problem: Android build system needs some debug (./configure options)
Proposal is to dump ./configure options to have an output like below:

```
LIBZMQ (x86_64) - ./configure options to build 'LIBZMQ':
  > --quiet
  > TOOLCHAIN=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64
  > CC=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android21-clang
  > CXX=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android21-clang++
  > LD=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/ld
  > AS=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as
  > AR=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
  > RANLIB=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib
  > STRIP=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip
  > CFLAGS= -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE
  > CPPFLAGS= -I/builds/CrisalidBox/zproject-android-testing/libzmq/builds/android/prefix/x86_64/include
  > CXXFLAGS=
  > LDFLAGS=-L/builds/CrisalidBox/zproject-android-testing/libzmq/builds/android/prefix/x86_64/lib -L/tmp/android-ndk-r25/sources/cxx-stl/llvm-libc++/libs/x86_64
  > LIBS=-lc -ldl -lm -llog -lc++_shared
  > PKG_CONFIG_LIBDIR=/tmp/android-ndk-r25/prebuilt/linux-x86_64/lib/pkgconfig
  > PKG_CONFIG_PATH=/builds/CrisalidBox/zproject-android-testing/libzmq/builds/android/prefix/x86_64/lib/pkgconfig
  > PKG_CONFIG_SYSROOT_DIR=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/sysroot
  > PKG_CONFIG_DIR=
  > --with-sysroot=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/sysroot
  > --host=x86_64-linux-android
  > --prefix=/builds/CrisalidBox/zproject-android-testing/libzmq/builds/android/prefix/x86_64
  > --disable-curve
  > --without-docs
```

Note:

  This mechanism is currently in use to identify/fix a bug in a recent PR for NDK update.

This mechanism is added before every call of `./configure`.

To be reported to CZMQ/ZYRE (via ZPROJECT).
2022-10-06 11:08:06 +02:00
Luca Boccassi
875c2b15c3
Merge pull request #4433 from stephan57160/master
Problem: Android build script may fail silently
2022-10-02 10:21:53 +01:00
Stephan Guilloux (cos)
0d49eddf16 Problem: Android build script may fail silently
Solution: Use `set -e`

Note:
To be reported in ZPROJECT, when generating the same for CZMQ & ZYRE.

Note:
`make clean` may fail when Makefile is not yet generated
(case of 1st call of build.sh after git clone).

Additionnaly, cleaned the dependency folder
(report of ZPROJECT generated scripts).
2022-10-02 02:27:12 +02:00
Luca Boccassi
a782d79d45
Merge pull request #4431 from stephan57160/master
Problem: Android helpers no not validate dependent libraries.
2022-10-01 11:56:10 +01:00
Stephan Guilloux (cos)
8b8fb6d80e Problem: Android helpers no not validate dependent libraries.
Seen in the code:
```
function android_build_verify_so {
...
    for dep_soname do
        if [[ $elfoutput != *"library: [${dep_soname}]"* ]]; then
            ANDROID_BUILD_FAIL+=("Library ${soname} was expected to be linked to library with soname:")
            ANDROID_BUILD_FAIL+=("  ${dep_soname}")
        fi
    done
```

The `for xxx` syntax is wrong, most probably a typo somewhere.

Solution: Fix & complete the `for xxx` loop.

Tested with & without LIBSODIUM (only available dependent library for LIBZMQ).

Note: The same has to be done in ZPROJECT, for CZMQ & ZYRE.
2022-10-01 03:59:23 +02:00
Luca Boccassi
e15fb044ef
Merge pull request #4430 from nyfix/test_spec_req_tmo
avoid intermittent timeouts in test (esp. when run w/ASAN etc.)
2022-09-30 21:45:04 +01:00
Bill Torpey
25b3e7af02 avoid intermittent timeouts in test (esp. when run w/ASAN etc.) 2022-09-30 11:45:19 -04:00
Luca Boccassi
c73447b9e7
Merge pull request #4429 from benjdero/master
Problem: Default Android NDK version is not aligned with zproject
2022-09-26 14:15:03 +01:00
Benjamin Deroche
1f1e8145d0 Problem: Default Android NDK version is not aligned with zproject
Solution: Set NDK r25 as the default. No compatiblity changes required.
2022-09-26 14:47:05 +02:00
Luca Boccassi
ec6f3b1dba
Merge pull request #4427 from stephan57160/master
Problem: builds/android/build.sh fails with CURVE=libsodium
2022-09-22 11:35:00 +01:00
Stephan Guilloux (cos)
d4dd8a5417 Changed more git:gihub.com to https://github.com 2022-09-22 02:47:22 +02:00
Stephan Guilloux (cos)
a7774e38e6 Problem: builds/android/build.sh fails with CURVE=libsodium
How to reproduce:
```
prompt> git clone libzmq
prompt> cd libzmq/builds/android
prompt> export CURVE=libsodium
prompt> ./ci_build.sh
Cloning into 'libsodium'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.4]: errno=Connection timed out

Cloning into 'libsodium'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.3]: errno=Connection timed out

Cloning into 'libsodium'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.3]: errno=Connection timed out

Cloning into 'libsodium'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.4]: errno=Connection timed out

prompt>
```

Reason: Invalid URL to download libsodium:
```
prompt> grep -s 'git clone' libzmq/builds/android/*.sh
libzmq/builds/android/build.sh:70:        (cd "${cache}" && git clone -b stable --depth 1 git://github.com/jedisct1/libsod
                                                                                          ^^^^^^^^^^^^^^^^^
```

URL should be either:
- `git@github.com:`
- `https://github.com/` same given in [zproject](https://github.com/zeromq/zproject/blob/master/zproject_known_projects.xml#L108-L111).

Solution: Change URL to `https://`.

Result:
```
prompt> export CURVE=libsodium
prompt> ./ci_build.sh
Cloning into 'libsodium'...
remote: Enumerating objects: 659, done.
remote: Counting objects: 100% (659/659), done.
remote: Compressing objects: 100% (586/586), done.
remote: Total 659 (delta 159), reused 220 (delta 34), pack-reused 0
Receiving objects: 100% (659/659), 1.97 MiB | 4.00 MiB/s, done.
Resolving deltas: 100% (159/159), done.
autoconf scripts already exist.
...
libtool: install: /bin/install -c tools/.libs/curve_keygen /home/cbox_dev/git/ZEROMQ/libzmq/builds/android/prefix/x86_64/bin/curve_keygen
 /bin/mkdir -p '/home/cbox_dev/git/ZEROMQ/libzmq/builds/android/prefix/x86_64/include'
 /bin/install -c -m 644 include/zmq.h include/zmq_utils.h '/home/cbox_dev/git/ZEROMQ/libzmq/builds/android/prefix/x86_64/include'
 /bin/mkdir -p '/home/cbox_dev/git/ZEROMQ/libzmq/builds/android/prefix/x86_64/lib/pkgconfig'
 /bin/install -c -m 644 src/libzmq.pc '/home/cbox_dev/git/ZEROMQ/libzmq/builds/android/prefix/x86_64/lib/pkgconfig'
make[2]: Leaving directory `/tmp/android_build/x86_64/libzmq'
make[1]: Leaving directory `/tmp/android_build/x86_64/libzmq'
libzmq android build succeeded
prompt>
```
2022-09-22 00:43:57 +02:00
Jack·Boos·Yu
9d4685d90c
[document] add vcpkg instruction (#4425)
* [document] Add vcpkg instruction step
2022-09-16 11:24:11 +01:00
Luca Boccassi
0ec2178edf
Merge pull request #4422 from minrk/bind-can-fail
Problem: bind can fail after open_socket succeeds on Windows without AF_UNIX
2022-09-08 16:17:39 +01:00
Min RK
bf906ee346
AF_UNIX support may fail on bind 2022-09-08 15:10:04 +02:00
Min RK
b2921d7183
check rc in make_fdpair
since it can fail, e.g. Windows + AF_UNIX
2022-09-08 11:17:51 +02:00
Abael He
4e193f36fc Problem: some tools misdetect null access or broken libsodium implementation
Build all projects

** BUILD SUCCEEDED **

bash-3.2# cd  bin/Debug/
bash-3.2# for x in ./* ; do ./$x 1> /dev/null 2>/dev/null  || echo $x ; done
./test_bind_curve_fuzzer
./test_bind_fuzzer
./test_bind_null_fuzzer
./test_connect_curve_fuzzer
./test_connect_fuzzer
./test_connect_null_fuzzer
Segmentation fault: 11
./test_security_curve
./test_z85_decode_fuzzer
bash-3.2# ./test_bind_curve_fuzzer
bash-3.2# ./test_bind_curve_fuzzer
bash-3.2# ./test_bind_fuzzer
bash-3.2# ./test_bind_null_fuzzer
bash-3.2# ./test_connect_curve_fuzzer
bash-3.2# ./test_connect_fuzzer
bash-3.2# ./test_security_curve
Segmentation fault: 11
bash-3.2# lldb ./test_security_curve
(lldb) target create "./test_security_curve"
Current executable set to '/Users/abaelhe/Downloads/libzmq-master/build/bin/Debug/test_security_curve' (x86_64).
(lldb) r
Process 39009 launched: '/Users/abaelhe/Downloads/libzmq-master/build/bin/Debug/test_security_curve' (x86_64)
Process 39009 stopped
* thread #3, name = 'ZMQbg/IO/0', stop reason = signal SIGSEGV
    frame #0: 0x00007ff80f64f192 libsystem_kernel.dylib`__pthread_sigmask + 10
libsystem_kernel.dylib`__pthread_sigmask:
->  0x7ff80f64f192 <+10>: jae    0x7ff80f64f19c            ; <+20>
    0x7ff80f64f194 <+12>: movq   %rax, %rdi
    0x7ff80f64f197 <+15>: jmp    0x7ff80f64a1c5            ; cerror_nocancel
    0x7ff80f64f19c <+20>: retq
Target 0: (test_security_curve) stopped.
(lldb) bt
warning: could not find Objective-C class data in the process. This may reduce the quality of type information available.
* thread #3, name = 'ZMQbg/IO/0', stop reason = signal SIGSEGV
  * frame #0: 0x00007ff80f64f192 libsystem_kernel.dylib`__pthread_sigmask + 10
    frame #1: 0x00007ff80f685acb libsystem_pthread.dylib`pthread_sigmask + 9
    frame #2: 0x00007ff80f5d1d19 libsystem_c.dylib`abort + 112
    frame #3: 0x0000000100333551 libsodium.23.dylib`_out_of_bounds.cold.1 + 17
    frame #4: 0x0000000100316229 libsodium.23.dylib`_out_of_bounds + 9
    frame #5: 0x0000000100316218 libsodium.23.dylib`sodium_free + 408
    frame #6: 0x00000001005a6d0d libzmq.5.dylib`zmq::secure_allocator_t<unsigned char>::deallocate(this=0x00007000014c6ce0, p="", (null)=96) at secure_allocator.hpp:63:56
    frame #7: 0x00000001005a6c25 libzmq.5.dylib`std::__1::allocator_traits<zmq::secure_allocator_t<unsigned char> >::deallocate(__a=0x00007000014c6ce0, __p="", __n=96) at allocator_traits.h:282:13
    frame #8: 0x00000001005a6484 libzmq.5.dylib`std::__1::__vector_base<unsigned char, zmq::secure_allocator_t<unsigned char> >::~__vector_base(this=0x00007000014c6cd0) at vector:488:9
    frame #9: 0x00000001005acae2 libzmq.5.dylib`std::__1::vector<unsigned char, zmq::secure_allocator_t<unsigned char> >::~vector(this=0x00007000014c6cd0 size=0) at vector:579:5
    frame #10: 0x00000001005ac165 libzmq.5.dylib`std::__1::vector<unsigned char, zmq::secure_allocator_t<unsigned char> >::~vector(this=0x00007000014c6cd0 size=0) at vector:574:5
    frame #11: 0x00000001005ab2e7 libzmq.5.dylib`zmq::curve_server_t::process_hello(this=0x000000010182c600, msg_=0x00006000037001e8) at curve_server.cpp:208:1
    frame #12: 0x00000001005aad30 libzmq.5.dylib`zmq::curve_server_t::process_handshake_command(this=0x000000010182c600, msg_=0x00006000037001e8) at curve_server.cpp:104:18
    frame #13: 0x000000010062ccd7 libzmq.5.dylib`zmq::stream_engine_base_t::process_handshake_command(this=0x000000010182d400, msg_=0x00006000037001e8) at stream_engine_base.cpp:491:32
    frame #14: 0x000000010062ba21 libzmq.5.dylib`zmq::stream_engine_base_t::in_event_internal(this=0x000000010182d400) at stream_engine_base.cpp:309:14
    frame #15: 0x000000010062b665 libzmq.5.dylib`zmq::stream_engine_base_t::in_event(this=0x000000010182d400) at stream_engine_base.cpp:243:22
    frame #16: 0x00000001005c0889 libzmq.5.dylib`zmq::kqueue_t::loop(this=0x00006000037000c0) at kqueue.cpp:218:30
    frame #17: 0x00000001005eefa9 libzmq.5.dylib`zmq::worker_poller_base_t::worker_routine(arg_=0x00006000037000c0) at poller_base.cpp:146:51
    frame #18: 0x0000000100637e66 libzmq.5.dylib`thread_routine(arg_=0x0000600003700100) at thread.cpp:256:5
    frame #19: 0x00007ff80f6864e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #20: 0x00007ff80f681f6b libsystem_pthread.dylib`thread_start + 15
(lldb)
2022-08-10 22:21:00 +01:00
Luca Boccassi
05701e4a56
Merge pull request #4412 from caicaiking/master
Problem: get_opt function read the options value not thread safe
2022-08-10 22:15:08 +01:00
Abama.cai
65eee9354a
Update tongsong-cai.md 2022-08-11 03:02:56 +08:00
Abama cai
6d131718f3 Add RELICENSE statement 2022-08-11 02:46:31 +08:00
Abama cai
717d1980ee Problem: get_opt function read the options value maybe not thread safe
Solution: use scoped lock to prevent them from being modified during reading
2022-08-10 22:35:14 +08:00
Luca Boccassi
0251be4d77
Merge pull request #4409 from nevalsar/master
Problem: Incorrect formatting of documentation in zmq_udp.txt
2022-08-03 16:19:01 +01:00
Nevin Valsaraj
5a9523227a
Add relicense for nevalsar
Add relicense statement for nevalsar.
2022-08-03 08:09:26 -07:00
Nevin Valsaraj
ea1962b825
Problem: Incorrect formatting of documentation in zmq_udp.txt
Solution: Replace incorrect underline pattern in zmq_udp.txt that
makes part of the text show up as pre-formatted code block with
regular underline pattern.
2022-07-22 09:19:13 -07:00