-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Really free stack after last BearSSL obj destroyed #5185
Conversation
This fixes the secondary issue found in #5175 by @MarcFinns. |
That was quick... Thanks! |
December is the next "scheduled" release, so git head is going to be the best bet for some time. |
Hi Earle, I erased the installation and followed the instructions to install from git (on macOS). |
You need to apply the PR patch until this is merged. See https://help.github.com/articles/checking-out-pull-requests-locally/ for more info. |
Thanks. I noticed that the version from GitHub (without this patch) uses more ram than the 2.4.2. Is this expected? |
The BearSSL second stack, once allocated, was never deallocated. The reference count of the stack pointer never hit 0 due to the initial creation counting as one. Now, check to see if there is only one use_count and if so then delete the stack.
16a6ba1
to
ae149ff
Compare
I confirm the specific issue is fixed. |
Looks basically the same to me. You're going to need a new bug and MCVE. Using your test sample and git head there's some difference, but it's <1KB:
tags/2.4.2:
|
@MarcFinns are you using wps in your app? |
Hi Devyte, thanks for the hint, i think this might indeed be related. |
In current git, if you use wps, a heap optimization is disabled, which allocates the cont stack on the heap instead of on top of the sys stack. This is because it was found that wps apparently has large stack use, so requuires the original huge size. |
The BearSSL second stack, once allocated, was never deallocated. The
reference count of the stack pointer never hit 0 due to the initial
creation counting as one. Now, check to see if there is only one use_count
and if so then delete the stack.