Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(zenoh-runtime): zenoh-c DLL crash in libc::atexit handler #972

Merged

Conversation

YuanYuYuan
Copy link
Contributor

@YuanYuYuan YuanYuYuan commented Apr 25, 2024

See #973 for the background of the issue.

In short, we need to disable the atexit callback while building to DLL on Windows.

It's hard to do conditional compilation on zenoh-runtime crate only since zenoh-runtime is a static lib to zenoh. To prevent introducing too complicated feature flags affecting both zenoh and zenoh-c, let's catch the panic error and process it accordingly.

To be clear,

  1. On Windows, zenoh-c in DLL: panic is expected.
  2. On Windows, zenoh-c in lib: panic shouldn't happen.
  3. Any other cases should report the error.

@YuanYuYuan YuanYuYuan force-pushed the fix/zenoh-c-dll-atexit-crash branch from 6b1bb64 to 7e0cf97 Compare April 25, 2024 13:03
@YuanYuYuan
Copy link
Contributor Author

This PR has been discussed in the chat. @Mallets can you help review this?

@Mallets Mallets merged commit 274166d into eclipse-zenoh:main Apr 25, 2024
11 checks passed
@Mallets Mallets deleted the fix/zenoh-c-dll-atexit-crash branch April 25, 2024 14:41
YuanYuYuan added a commit to ZettaScaleLabs/zenoh that referenced this pull request Apr 26, 2024
Mallets pushed a commit that referenced this pull request Apr 26, 2024
* Revert "fix(zenoh-runtime): zenoh-c DLL crash in `libc::atexit` handler (#972)"

This reverts commit 274166d.

* ci: disable atexit cleanup on Windows
Mallets added a commit that referenced this pull request Apr 30, 2024
* fix(zenoh_runtime): disable atexit on windows (#981)

* Revert "fix(zenoh-runtime): zenoh-c DLL crash in `libc::atexit` handler (#972)"

This reverts commit 274166d.

* ci: disable atexit cleanup on Windows

* fix: Deny publishing of zenoh-ext-examples (#984)

* Fix runtime start calling (#985)

* Fix invalid JSON in admin space for static plugins (#988)

* Fix admin space: plugins __path__ was invalid JSON (#990)

* fix(test): sporadic failures of downsampling test on Windows (#995)

* fix: set the minimal sleep interval to 17ms on windows

* fixup! fix: set the minimal sleep interval to 17ms on windows

* fixup! fix: set the minimal sleep interval to 17ms on windows

* Acl fix (#993)

* ACL does not intercept messages with no key_expr

* Update DEFAULT_CONFIG.json5

---------

Co-authored-by: Yuyuan Yuan <[email protected]>
Co-authored-by: Mahmoud Mazouz <[email protected]>
Co-authored-by: Julien Enoch <[email protected]>
Co-authored-by: OlivierHecart <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants