Open
Description
The following code defines an asynchronous function goo that takes two arguments a and b. The asyncio.create_task() function is then used inside the main function to create a task object that represents the execution of the goo coroutine with arguments 1 and b=1. Finally, the repr() function obtains a string representation of the task object. The asyncio.run() function runs the main coroutine and execute the task. The code essentially creates and runs an empty task while RustPython gets crashing.
import asyncio
async def goo(a, b): pass
async def main():
task = asyncio.create_task(goo(1, b=1))
print(repr(task))
asyncio.run(main())
Crash message:
thread 'main' panicked at 'index out of bounds: the len is 2 but the index is 18446744073709551615', vm/src/frame.rs:169:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Environment:
Ubuntu 18.04
rustpython v0.2.0