-
Notifications
You must be signed in to change notification settings - Fork 15k
Open
Labels
clang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]lambdaC++11 lambda expressionsC++11 lambda expressions
Description
Version: 19.1.7
Host OS: macOS Sonoma 14.4
Flags: -ffreestanding -mcmodel=kernel
Target: x86_64-none-elf
Code:
/* syscall entry point */
static auto syscall_entry = []() __attribute__((naked))
{
asm volatile(
"swapgs\n"
"movq %rsp, %gs:16\n"
"movq %gs:8, %rsp\n"
"ret"
);
};I happened to run into a crash when compiling kernel code using a lambda with __attribute__((naked)).
This code doesn't crash during compilation with x86_64-elf-g++. I may be able to contribute a fix for this issue if needed.
Link to the attached file as I am not able to attach it normally: https://pastebin.com/GzeB8ga7
Metadata
Metadata
Assignees
Labels
clang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]lambdaC++11 lambda expressionsC++11 lambda expressions