Closed
Bug 1918767
Opened 2 months ago
Closed 2 months ago
Use of __forceinline / __attribute__((always_inline)) causes excessive stack usage in some build configurations
Categories
(NSS :: Libraries, defect, P2)
NSS
Libraries
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jschanck, Assigned: jschanck)
References
Details
Attachments
(1 file)
Many HACL* functions are annotated with inline __forceinline
(msvc) or inline __attribute__((always_inline))
(gcc/clang) via the KRML_MUSTINLINE macro.
This causes, among other things, generate_keypair_a2
in the new ML-KEM code to use over 400 KB of stack space (due to several copies of a fully-unrolled SHA3 implementation get inlined into the function).
We should define KRML_MUSTINLINE
as inline
to give the compiler more flexibility avoid excessive stack usage.
Assignee | ||
Comment 1•2 months ago
|
||
Assignee | ||
Comment 2•2 months ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Comment 3•2 months ago
|
||
Don't we need the same for gmake builds?
bob
You need to log in
before you can comment on or make changes to this bug.
Description
•