call V from C not working when closure. #19446
Labels
Bug
This tag is applied to issues which reports bugs.
Unit: cgen
Bugs/feature requests, that are related to the default C generating backend.
Describe the bug
i tried calling v from c via shared lib. but it doesn't work on closure of v.
signal 11: segmentation fault
. but if not closure is not a problem.Reproduction Steps
V code
command:
v -cc gcc -shared foo.v
C code
compile:
gcc foo.c foo.so -o foo -Wl,-rpath=.
next i call
./foo
in terminal.Expected Behavior
Expected output is
bar
in terminal.Current Behavior
Possible Solution
No response
Additional Information/Context
No response
V version
Current V version: V 0.4.1 a8a3d3a, timestamp: 2023-09-26 07:02:39 +0300
Environment details (OS name and version, etc.)
Important
You can vote for this issue using the 👍 reaction. More votes increase the issue's priority
for developers.
Take into account that only the 👍 reaction counts as a vote.
Only reactions to the issue itself will be counted as votes, not comments.
The text was updated successfully, but these errors were encountered: