Giter Site home page Giter Site logo

Comments (3)

Timac avatar Timac commented on June 21, 2024

Thanks for reporting this weird issue. Could you please run image list in lldb when debugging VPNStatus? At the moment I have no explanation explaining that this issue only occurs for debug builds on M1 machines. Could it be that /usr/lib/system/libsystem_networkextension.dylib is not used on your machine but instead another debug dylib which doesn't know about ne_session_set_event_handler_block?

from vpnstatus.

alxtplv avatar alxtplv commented on June 21, 2024

While debugging arm64 version:

(lldb) image list | grep libsystem_networkextension.dylib [ 0] B9F72E76-4B73-3B63-89E0-9D359BFDE954 0x00000001ba6ee000 /usr/lib/system/libsystem_networkextension.dylib

With ne_session_set_event_handler_block changed to
typedef void (^ne_session_set_event_handler_block)(ne_session_event_t event, void *event_data);
and defined typedef int ne_session_event_t; both arm64 VPNStatus builds (debug and release ) work fine on my M1.
X86_64 builds work fine under Rosetta as well.

SCNetworkConnection.c, line 2468
ne_session_set_event_handler(connectionPrivate->ne_session, __SCNetworkConnectionQueue(), ^(ne_session_event_t event, void *event_data) ...

line 2746
ne_session_set_event_handler(new_session, __SCNetworkConnectionQueue(), ^(ne_session_event_t event, void *event_data) ...

from vpnstatus.

Timac avatar Timac commented on June 21, 2024

@alxtplv Thanks a lot for the research and help. It appears that you are absolutely right and I incorrectly reverse-engineered the prototype of ne_session_set_event_handler_block. I modified the code as you suggested.

The fact that the parameters were not used might explain why the release version was not crashing?

from vpnstatus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.