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
When compile a compile time reflection v code, compiler will crash.
Reproduction Steps
hello.v
structTest {
}
fnmain() {
$for f in Test.params {
println(f)
}
}
Expected Behavior
Compiler should not crash.
Current Behavior
Compiler crash :
/tmp/v_1000/v2.01J9BZ6PA7SRDB5Q0WPWYXXZ05.tmp.c:46768: at v__gen__c__Gen_comptime_for: RUNTIME ERROR: invalid memory access
/tmp/v_1000/v2.01J9BZ6PA7SRDB5Q0WPWYXXZ05.tmp.c:39297: by v__gen__c__Gen_stmt
/tmp/v_1000/v2.01J9BZ6PA7SRDB5Q0WPWYXXZ05.tmp.c:39119: by v__gen__c__Gen_stmts_with_tmp_var
/tmp/v_1000/v2.01J9BZ6PA7SRDB5Q0WPWYXXZ05.tmp.c:39025: by v__gen__c__Gen_stmts
/tmp/v_1000/v2.01J9BZ6PA7SRDB5Q0WPWYXXZ05.tmp.c:48167: by v__gen__c__Gen_gen_fn_decl
/tmp/v_1000/v2.01J9BZ6PA7SRDB5Q0WPWYXXZ05.tmp.c:47755: by v__gen__c__Gen_fn_decl
/tmp/v_1000/v2.01J9BZ6PA7SRDB5Q0WPWYXXZ05.tmp.c:39335: by v__gen__c__Gen_stmt
/tmp/v_1000/v2.01J9BZ6PA7SRDB5Q0WPWYXXZ05.tmp.c:39119: by v__gen__c__Gen_stmts_with_tmp_var
/tmp/v_1000/v2.01J9BZ6PA7SRDB5Q0WPWYXXZ05.tmp.c:39025: by v__gen__c__Gen_stmts
/tmp/v_1000/v2.01J9BZ6PA7SRDB5Q0WPWYXXZ05.tmp.c:37917: by v__gen__c__Gen_gen_file
/tmp/v_1000/v2.01J9BZ6PA7SRDB5Q0WPWYXXZ05.tmp.c:37859: by v__gen__c__cgen_process_one_file_cb
/tmp/v_1000/v2.01J9BZ6PA7SRDB5Q0WPWYXXZ05.tmp.c:48390: by sync__pool__process_in_thread
/tmp/v_1000/v2.01J9BZ6PA7SRDB5Q0WPWYXXZ05.tmp.c:12014: by sync__pool__process_in_thread_thread_wrapper
0x7c00d1e9ca94: by ???
0x7c00d1f29c3c: by ???
Describe the bug
When compile a compile time reflection v code, compiler will crash.
Reproduction Steps
hello.v
Expected Behavior
Compiler should not crash.
Current Behavior
Compiler crash :
Possible Solution
Fix checker?
Additional Information/Context
No response
V version
V full version: V 0.4.8 7b8e059.0390c07
Environment details (OS name and version, etc.)
V full version: V 0.4.8 7b8e059.0390c07
OS: linux, Ubuntu 24.04.1 LTS
Processor: 8 cpus, 64bit, little endian, Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz
getwd: /home/mars/v/toml
vexe: /media/HD/github/kbkpbot/v/v
vexe mtime: 2024-10-04 14:33:40
vroot: OK, value: /media/HD/github/kbkpbot/v
VMODULES: OK, value: /home/mars/.vmodules
VTMP: OK, value: /tmp/v_1000
Git version: git version 2.43.0
Git vroot status: weekly.2024.30-404-g209c30f3
.git/config present: true
CC version: cc (Ubuntu 13.2.0-23ubuntu4) 13.2.0
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.
The text was updated successfully, but these errors were encountered: