-
Notifications
You must be signed in to change notification settings - Fork 56
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
For MSVC use alloca() instead of VLA #26
Conversation
Was this tested? AFAICT MSVC doesn't have alloca, but it does have _alloca (deprecated) in malloc.h (for maximum confusion). |
I'm not certain that allocating variable length automatic arrays (either with VLAs or using alloca) is the Right Thing. Two examples:
|
Even though this perhaps isn't at all the best way to solve this, it would be great if we can actually merge some form of this PR so that we can proceed with updating PQClean (and OQS downstream). |
@sfluhrer I want to propose to merge a rebased version of this patch together with Thom's suggestion for now. Then, later, we can get rid of the variable sized arrays alltogether. |
@thomwiggers Rebased. If builds pass, please give it a double-check. |
Closes #20 Co-authored-by: Thom Wiggers <thom@thomwiggers.nl>
Seems to compile just fine using MSVC. There's some more work needed before this repo will produce useful binaries (mostly because the test binaries here use OpenSSL and the random number generator isn't set up for Windows) -- but I'm not getting VLA problems here. |
Continuation of sphincs#26
Closes #20
@thomwiggers