Skip to content

Compiler randomly crashes when parallel compilation is enabled #23980

Description

@XiaoPangxie732

Describe the bug

The compiler randomly crashes for an unknown reason when parallel compilation is enabled

Reproduction Steps

  1. Clone the repo
  2. Run v . or v run .
  3. The compiler either crashes(chances are ~1/10, and using v run . seems to have a higher chance) or compiles fine

Expected Behavior

Always compiles fine

Current Behavior

Randomly crashes. Error message(with v -g self):

Unhandled Exception 0xf5fd2a0
C:/Users/***/AppData/Local/Temp/v_0/E:\Programs\v\vlib\builtin\backtraces_windows.c.v:168: at print_backtrace_skipping_top_frames_tcc: Backtrace
C:/Users/***/AppData/Local/Temp/v_0/E:\Programs\v\vlib\builtin\backtraces_windows.c.v:70: by print_backtrace_skipping_top_frames
C:/Users/***/AppData/Local/Temp/v_0/E:\Programs\v\vlib\builtin\builtin_windows.c.v:132: by unhandled_exception_handler
7ffdcb053556 : by ???

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.4.9 87b1de8

Environment details (OS name and version, etc.)

V full version V 0.4.9 725e259.87b1de8
OS windows, Microsoft Windows 11 Pro 26100 64-bit
Processor 12 cpus, 64bit, little endian, Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
Memory 2.4GB/15.86GB
V executable E:\Programs\v\v.exe
V last modified time 2025-03-19 18:21:49
V home dir OK, value: E:\Programs\v
VMODULES OK, value: C:\Users***.vmodules
VTMP OK, value: C:\Users***\AppData\Local\Temp\v_0
Current working dir OK, value: F:\Projects\PistonMC\Shovel
Git version git version 2.38.1.windows.1
V git status weekly.2025.12-6-g87b1de82
.git/config present true
cc version N/A
gcc version N/A
clang version N/A
msvc version N/A
tcc version tcc version 0.9.27 (x86_64 Windows)
tcc git status thirdparty-windows-amd64 b425ac82
emcc version N/A
glibc version N/A

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Metadata

Metadata

Assignees

Labels

BugThis tag is applied to issues which reports bugs.Unit: cgenBugs/feature requests, that are related to the default C generating backend.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions