Describe the bug
An empty main() compiled with tcc generates a binary that triggers a segfault.
Notes
Adding -g or -gc boehm flag does prevent any error
Adding -cg flag triggers bus error
Reproduction Steps
Expected Behavior
success
Current Behavior
segmentation fault
Possible Solution
No response
Additional Information/Context
No response
V version
0.5.2 a5a89d5
Environment details (OS name and version, etc.)
V full version
V 0.5.2 76f77e3 .a5a89d5
OS
macos, macOS, 27.0, 26A5388g
V git status
0.5.2-210-ga5a89d56
cc version
Apple clang version 21.0.0 (clang-2100.1.1.101)
gcc version
Apple clang version 21.0.0 (clang-2100.1.1.101)
clang version
Apple clang version 21.0.0 (clang-2100.1.1.101)
tcc version
tcc version 0.9.28rc 2026-07-24 HEAD@85ba3ae8 (AArch64 Darwin)
tcc git status
thirdparty-macos-arm64 274abd24
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.
Describe the bug
An empty
main()compiled withtccgenerates a binary that triggers a segfault.Notes
-gor-gc boehmflag does prevent any error-cgflag triggers bus errorReproduction Steps
Expected Behavior
success
Current Behavior
segmentation fault
Possible Solution
No response
Additional Information/Context
No response
V version
0.5.2 a5a89d5
Environment details (OS name and version, etc.)
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.