Compiler crashes with SIGSEGV when using big.integer_from_string in const in module #22961
Labels
Bug
This tag is applied to issues which reports bugs.
Status: Confirmed
This bug has been confirmed to be valid by a contributor.
Unit: cgen
Bugs/feature requests, that are related to the default C generating backend.
Describe the bug
Using the
big.integer_from_string
function inside a module as a constant causes a compiler segmentation fault. See reproduction steps below.Note that the same code but in the
main
module does not result in an segfault:Reproduction Steps
Create a dir e.g.
mymod
with contents:Then run
v test .
Expected Behavior
No segfault.
Current Behavior
Compiler crashes with segfault.
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.8 1345eac
Environment details (OS name and version, etc.)
V full version: V 0.4.8 5ec9bb5.1345eac
OS: linux, Linux version 6.6.8-arch1-1 (linux@archlinux) (gcc (GCC) 13.2.1 20230801, GNU ld (GNU Binutils) 2.41.0) #1 SMP PREEMPT_DYNAMIC Thu, 21 Dec 2023 19:01:01 +0000
Processor: 16 cpus, 64bit, little endian, 12th Gen Intel(R) Core(TM) i5-1240P
getwd: /home/ge/Code/v/netaddr/issues/mymod
vexe: /home/ge/.vlang/v
vexe mtime: 2024-11-24 11:11:18
vroot: OK, value: /home/ge/.vlang
VMODULES: OK, value: /home/ge/.vmodules
VTMP: OK, value: /tmp/v_1000
Git version: git version 2.46.1
Git vroot status: weekly.2024.47-25-g1345eac5 (3 commit(s) behind V master)
.git/config present: true
CC version: cc (GCC) 14.2.1 20240910
emcc version: N/A
thirdparty/tcc status: thirdparty-linux-amd64 0134e9b9
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.
Huly®: V_0.6-21402
The text was updated successfully, but these errors were encountered: