Skip to content

MSVC: Segfaults with opt-level=3 plus unwinding #33352

Closed
@alexcrichton

Description

@alexcrichton

I've encountered two mysterious segfaults with opt-level=3 so far when porting our build system to rustbuild. Cargo tries to optimize aggressively by passing -C opt-level=3 in optimized mode, but that had to get dialed back to -C opt-level=2 in two cases.

One is in compiletest, added in #32755, and I believe these failing logs (cached here) are the segfault.

The next is in stdtest, being modified in #33282, erroring here, and cached here. The faulting test in std was sync::once::tests::poison_bad.

Both faults look very related to unwinding, and are likely due to the early support of SEH in LLVM. This may or may not be fixed upstream (not tested), and if it's not we should probably reduce and send a test case upstream. Unfortunately simple minimizations have not succeeded just yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.O-windows-msvcToolchain: MSVC, Operating system: Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions