Skip to content

Conversation

NuSkooler
Copy link
Contributor

@NuSkooler NuSkooler commented Sep 8, 2025

On Windows, if DLL 'A' for example mallocs, it must be DLL 'A' that makes the free call in order to ensure the proper runtime. Currently Windows builds crash due to this problem. To reproduce (on Windows):

let mut ctx = Context::new(TctiNameConf::Tbs).context("init TBS TCTI")?;
let rnd = ctx.get_random(16).context("TPM2_GetRandom failed")?; 

This MR uses Esys_Free to free allocated data. I may have missed some areas, so would love pointers. It's a bit tricky to test all the stuff here.

Copy link
Collaborator

@Superhepper Superhepper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for finding this problem. I have just a few points that I would like to be addressed.

@NuSkooler
Copy link
Contributor Author

Thanks @Superhepper I believe I have the changes ready!

@Superhepper
Copy link
Collaborator

Now you just need to sign your commits and make sure that everything is properly formatted and it should pass all the checks.

@NuSkooler
Copy link
Contributor Author

Now you just need to sign your commits and make sure that everything is properly formatted and it should pass all the checks.

Updated, thanks!

@Superhepper
Copy link
Collaborator

Just squash the changes into one commit and then you sign it.

@NuSkooler
Copy link
Contributor Author

Just squash the changes into one commit and then you sign it.

Squashed.

@Superhepper
Copy link
Collaborator

It seems as if you forgot to sign it.

@NuSkooler
Copy link
Contributor Author

It seems as if you forgot to sign it.

Signed again :)

@wiktor-k
Copy link
Collaborator

It seems as if you forgot to sign it.

Signed again :)

I think it needs a sign off (not necessarily a GPG signsture). It's a different switch: -s instead of -S. :)

@NuSkooler
Copy link
Contributor Author

It seems as if you forgot to sign it.

Signed again :)

I think it needs a sign off (not necessarily a GPG signsture). It's a different switch: -s instead of -S. :)

Signed off on this side

@Superhepper Superhepper merged commit c1caa59 into parallaxsecond:main Sep 16, 2025
12 checks passed
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.

3 participants