You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basic program fails with "signal 11: segmentation fault" when executed via 'v run' or via 'REPL'.
Quickest way to reproduce it is to call print* functions, e.g.: examples/hello_world.v
It looks like it is attempting to write to memory that has not been allocated to the process for writing (for example, when array bounds are exceeded).
1. Update V et al:
$> v up
Updating V...
V is already updated.
Current V version: V 0.4.3 0b12d64, timestamp: 2023-12-13 22:32:52 +0200
$> v outdated
Modules are up to date.
$> v install
Detected v.mod file inside the project directory. Using it...
Nothing to install.
$>
2. Segmentation fault on 'v run examples/hello_world.v':
$> ls examples/hello_world*
examples/hello_world.v
$> cat examples/hello_world.v
println('Hello, World!')
$> v run examples/hello_world.v
signal 11: segmentation fault
0 libsystem_platform.dylib 0x00007ff8081085ed _sigtramp + 29
1 ??? 0x0000000000000000 0x0 + 0
2 v 0x000000010c25251b os__Process__spawn + 155
3 v 0x000000010c252443 os__Process_wait + 35
4 v 0x000000010c580d85 v__builder__Builder_run_compiled_executable_and_exit + 3701
5 v 0x000000010c57e55c v__builder__compile + 124
6 v 0x000000010c589ff9 main__rebuild + 121
7 v 0x000000010c589205 main__main + 2181
8 v 0x000000010c58eb10 main + 64
9 dyld 0x00007ff807d8141f start + 1903
$>
3. Compiled version works:
$> ls examples/hello_world*
examples/hello_world* examples/hello_world.v
$> ./examples/hello_world
Hello, World!
$>
4. Segmentation fault on REPL equivalent:
$> v
____ ____
\ \ / / | Welcome to the V REPL (for help with V itself, typeexit , then run v help ).
\ \/ / | Note: the REPL is highly experimental. For best V experience, use a text editor,
\ / | save your code in a main.v file and execute: v run main.v
\ / | V 0.4.3 0b12d64 . Use list to see the accumulated program so far.
\__/ | Use Ctrl-C or exit to exit, or help to see other available commands.
>>> print('test')
signal 11: segmentation fault
0 libsystem_platform.dylib 0x00007ff8081085ed _sigtramp + 29
1 ??? 0x0000000000000000 0x0 + 0
2 v 0x000000010ab1151b os__Process__spawn + 155
3 v 0x000000010ab11443 os__Process_wait + 35
4 v 0x000000010ae3fd85 v__builder__Builder_run_compiled_executable_and_exit + 3701
5 v 0x000000010ae3d55c v__builder__compile + 124
6 v 0x000000010ae48ff9 main__rebuild + 121
7 v 0x000000010ae48205 main__main + 2181
8 v 0x000000010ae4db10 main + 64
9 dyld 0x00007ff807d8141f start + 1903
>>> println('test')
signal 11: segmentation fault
0 libsystem_platform.dylib 0x00007ff8081085ed _sigtramp + 29
1 ??? 0x0000000000000000 0x0 + 0
2 v 0x00000001016bd51b os__Process__spawn + 155
3 v 0x00000001016bd443 os__Process_wait + 35
4 v 0x00000001019ebd85 v__builder__Builder_run_compiled_executable_and_exit + 3701
5 v 0x00000001019e955c v__builder__compile + 124
6 v 0x00000001019f4ff9 main__rebuild + 121
7 v 0x00000001019f4205 main__main + 2181
8 v 0x00000001019f9b10 main + 64
9 dyld 0x00007ff807d8141f start + 1903
>>> exit
$>
Reproduction Steps
Run the following In V directory:
v up
v outdated
v install
ls examples/hello_world*
cat examples/hello_world.v
v run examples/hello_world.v
ls examples/hello_world*
./examples/hello_world
In v REPL:
print('test')
println('test')
Expected Behavior
Expected v run to execute code without an error.
Expected v REPL to execute code without an error.
Current Behavior
Segmentation fault in both cases.
Possible Solution
No response
Additional Information/Context
No response
V version
Current V version: V 0.4.3 0b12d64, timestamp: 2023-12-13 22:32:52 +0200
Environment details (OS name and version, etc.)
$> v doctor
V full version: V 0.4.3 0b12d64
OS: macos, macOS, 13.5.2, 22G91
Processor: 16 cpus, 64bit, little endian, Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
getwd: /Users/USER/PATH/v/v
vexe: /Users/USER/PATH/v/v/v
vexe mtime: 2023-12-14 00:57:32
vroot: OK, value: /Users/USER/PATH/v/v
VMODULES: OK, value: /Users/USER/.vmodules
VTMP: OK, value: /tmp/v_502
Git version: git version 2.43.0
Git vroot status: weekly.2023.50-22-g0b12d647-dirty
.git/config present: true
CC version: Apple clang version 15.0.0 (clang-1500.1.0.2.5)
thirdparty/tcc status: thirdparty-macos-amd64 46662e20
$>
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:
Describe the bug
Basic program fails with "signal 11: segmentation fault" when executed via 'v run' or via 'REPL'.
Quickest way to reproduce it is to call print* functions, e.g.: examples/hello_world.v
It looks like it is attempting to write to memory that has not been allocated to the process for writing (for example, when array bounds are exceeded).
1. Update V et al:
2. Segmentation fault on 'v run examples/hello_world.v':
3. Compiled version works:
4. Segmentation fault on REPL equivalent:
Reproduction Steps
Run the following In V directory:
In v REPL:
Expected Behavior
Expected v run to execute code without an error.
Expected v REPL to execute code without an error.
Current Behavior
Segmentation fault in both cases.
Possible Solution
No response
Additional Information/Context
No response
V version
Current V version: V 0.4.3 0b12d64, timestamp: 2023-12-13 22:32:52 +0200
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.
The text was updated successfully, but these errors were encountered: