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

invalid constant serialized in openfhe emitter #1656

Open
j2kun opened this issue Apr 4, 2025 · 1 comment · May be fixed by #1657
Open

invalid constant serialized in openfhe emitter #1656

j2kun opened this issue Apr 4, 2025 · 1 comment · May be fixed by #1657
Assignees
Labels
bug Something isn't working

Comments

@j2kun
Copy link
Collaborator

j2kun commented Apr 4, 2025

Google-internal build system (I think ASAN) detected a bug:

heir/tests/Examples/openfhe/bfv/dot_product_8/dot_product_8_lib.h:73:26: error: implicit conversion from 'long' to 'usint' (aka 'unsigned int') changes value from 7595718147998050665 to 1768515945 [-Werror,-Wconstant-conversion]
   73 |   params.SetEvalAddCount(7595718147998050665);
      |          ~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
heir/tests/Examples/openfhe/bfv/dot_product_8/dot_product_8_lib.h:74:28: error: implicit conversion from 'long' to 'usint' (aka 'unsigned int') changes value from 7595718147998050665 to 1768515945 [-Werror,-Wconstant-conversion]
   74 |   params.SetKeySwitchCount(7595718147998050665);

7595718147998050665 is the poison value malloc uses for a use-after-free detection.

@j2kun j2kun added the bug Something isn't working label Apr 4, 2025
@asraa
Copy link
Collaborator

asraa commented Apr 4, 2025

I found that happening in a recent pr for key evaluation technique - i think it was unitialized in this code when you get the config from the module

config.encryptionTechniqueExtended = false;

@asraa asraa self-assigned this Apr 4, 2025
copybara-service bot pushed a commit that referenced this issue Apr 4, 2025
… specified in params

Fixes #1656

PiperOrigin-RevId: 743971798
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants