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)

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.

Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED

Don't we need the same for gmake builds?
bob

See Also: → 1919577
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: