-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: missing gas costs and memory issues
Add missing gas costs for multiple operations, mainly for FheBool, FheUint160 and FheUint2048. Note that verify for bool is more expensive due to lack of cast from 2048 bits to bool - doing not equal instead. Make `castTo()` fail and not panic on bad type input. Fixed a memory leak in `executeTernaryCiphertextOperation()` - the `first_ptr` pointer was never freed. Refactor some of the code such that it uses `defer` with destroy as close to the point where memory is allocated as possible - that fixes memory leaks on early returns in multiple places. C code needs to be refactored and reduced. Maybe we can use codegen or a tool for that.
- Loading branch information
1 parent
d22f070
commit f5fa26a
Showing
2 changed files
with
229 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.