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

http.get() in init context causes nil pointer dereference panic #699

Closed
na-- opened this issue Jul 6, 2018 · 0 comments
Closed

http.get() in init context causes nil pointer dereference panic #699

na-- opened this issue Jul 6, 2018 · 0 comments
Assignees
Labels

Comments

@na--
Copy link
Member

na-- commented Jul 6, 2018

Running this script:

import http from 'k6/http';

http.get("http://test.loadimpact.com");

export default function () {
	console.log("test");
}

panics with:

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: Panic at 40: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: Panic at 40: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x120 pc=0xaa5915]
...

Not sure if we should allow http function calls in the init context at all, but either we have to show a nice error message or it should work.

@na-- na-- added the bug label Jul 6, 2018
@na-- na-- added this to the v1.0.0 milestone Oct 4, 2018
@mstoykov mstoykov self-assigned this Oct 15, 2018
mstoykov added a commit that referenced this issue Oct 15, 2018
instead return an error telling you this is not supported
@na-- na-- removed this from the v1.0.0 milestone Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants