Skip to content
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

Unhandled Exception 0xC0000005 #21857

Closed
russo-2025 opened this issue Jul 12, 2024 · 1 comment · Fixed by #21873
Closed

Unhandled Exception 0xC0000005 #21857

russo-2025 opened this issue Jul 12, 2024 · 1 comment · Fixed by #21873
Labels
Bug This tag is applied to issues which reports bugs. Unit: Checker Bugs/feature requests, that are related to the type checker.

Comments

@russo-2025
Copy link

russo-2025 commented Jul 12, 2024

Describe the bug

C:\Users\russo\Desktop\vbugs>v run bug2.v
Unhandled Exception 0xC0000005
C:/Users/russo/AppData/Local/Temp/v_0/bug2.01J2MF248CMNTQFYY67VZKZBNB.tmp.c:6987: at print_backtrace_skipping_top_frames_tcc: Backtrace
C:/Users/russo/AppData/Local/Temp/v_0/bug2.01J2MF248CMNTQFYY67VZKZBNB.tmp.c:6954: by print_backtrace_skipping_top_frames
C:/Users/russo/AppData/Local/Temp/v_0/bug2.01J2MF248CMNTQFYY67VZKZBNB.tmp.c:7832: by unhandled_exception_handler
7ffdfd4881bc : by ???
7ffdfb73ffa6 : at ???: RUNTIME ERROR: invalid memory access
7ffdfd433403 : by ???
7ffdfae7b770 : by ???
4840ec8348571024 : by ???
Unhandled Exception 0xC0000005
C:/Users/russo/AppData/Local/Temp/v_0/bug2.01J2MF248CMNTQFYY67VZKZBNB.tmp.c:6987: at print_backtrace_skipping_top_frames_tcc: Backtrace
C:/Users/russo/AppData/Local/Temp/v_0/bug2.01J2MF248CMNTQFYY67VZKZBNB.tmp.c:6954: by print_backtrace_skipping_top_frames
C:/Users/russo/AppData/Local/Temp/v_0/bug2.01J2MF248CMNTQFYY67VZKZBNB.tmp.c:7832: by unhandled_exception_handler
7ffdfd4881bc : by ???
void main__foo(main__Expr1** expr) {
	println((*expr)->name);
}

void main__main(void) {
	main__Expr1 expr = ((main__Expr1){.name = _SLIT("123"),});
	main__foo((voidptr)&/*qq*/expr);
}

Reproduction Steps

v run bug2.v

module main

pub struct Expr1 {
	name string
}

fn  foo(mut expr &Expr1) { // <---- &
	println(expr.name)
}

fn main() {
	mut expr := Expr1{name: "123"}
	foo(mut expr)
}

Expected Behavior

human-readable error message(aka cannot use '&Expr1' as '&&Expr1' in argument 1 to 'foo')

Current Behavior

0xC0000005

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.4.6 7908957

Environment details (OS name and version, etc.)

V full version: V 0.4.6 58a8fc6.7908957
OS: windows, Windows 10 Pro v19042 64-bit
Processor: 16 cpus, 64bit, little endian,

getwd: M:_projects_skyrim\papyrus-compiler
vexe: M:_dev\vlang\v.exe
vexe mtime: 2024-07-12 16:28:32

vroot: OK, value: M:_dev\vlang
VMODULES: OK, value: C:\Users\russo.vmodules
VTMP: OK, value: C:\Users\russo\AppData\Local\Temp\v_0

Git version: git version 2.45.1.windows.1
Git vroot status: weekly.2024.28-9-g79089578 (2 commit(s) behind V master)
.git/config present: true

CC version: Error: 'cc' is not recognized as an internal or external command,
operable program or batch file.

thirdparty/tcc: N/A

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.

@russo-2025 russo-2025 added the Bug This tag is applied to issues which reports bugs. label Jul 12, 2024
@russo-2025
Copy link
Author

similar bug #21856

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs. Unit: Checker Bugs/feature requests, that are related to the type checker.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants