-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-autofree with net.len() Unknown address family ~/v/vlib/net/address.c.v:111 #20635
Comments
https://github.com/vlang/v/blob/master/vlib/picoev/socket_util.c.v#L126-L129
|
Added two more test-data to explain the issue:
|
Without autofree:
|
if the host is set to ":" it works, for example: this is because of these lines in vlib/net/address.c.v:resolve_ipaddrs:170-180
|
The issue comes down to something wrong when pushing an item to an array when using -autofree
|
same with |
After simplifying: fn foo () ![]int {
mut arr := []int{}
arr << 1
return arr
}
fn main() {
a := foo()!
println(a)
} v -autofree -cg run a.v:
|
Describe the bug
v -autofree -cg run autofree.v
Reproduction Steps
Run this code with:
v -autofree -cg run autofree.v
Expected Behavior
Server should start similar to running without the -autofree flag
Current Behavior
Crashes:
Possible Solution
Tempfix: picoev fixed with detecting -autofree
Permfix: check and fix how autofree does for net.c.v
Additional Information/Context
No response
V version
0.4.4
Environment details (OS name and version, etc.)
Mac (same error on linux too)
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.
The text was updated successfully, but these errors were encountered: