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

Assertions on return value of CgosLibInitialize cause panics in virtualized environments #4

Open
Farmadupe opened this issue Dec 5, 2024 · 0 comments

Comments

@Farmadupe
Copy link

Farmadupe commented Dec 5, 2024

When a congatec board controller is not present, CgosLibInitialize returns zero when called (from browsing the sources it seems that despite this name, this function attempts to communicate with an underlying congatec board controller)

The below assertion in congatec.rs prevents cgos-rs from being used in virtualized environments (e.g. virtual machines)

assert_ne!(unsafe { CgosLibInitialize() }, 0);
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

No branches or pull requests

1 participant