Closed bwesterb closed 2 years ago
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.
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.
Closes #20
@thomwiggers