Closed
Description
In #111263, I added a Future::map
combinator that always returns Poll::Pending
. However, the corresponding test in coretests
crashes with a segfault, instead of hanging indefinitely (the expected behavior for this incomplete implementation). According to GDB, the test function is miscompiled quite badly, and just unconditionally dereferences a NULL pointer when run:
Dump of assembler code for function _ZN9coretests6future8test_map17hc8a76af39ef20947E:
0x0000555555735320 <+0>: sub $0x38,%rsp
0x0000555555735324 <+4>: movb $0x0,(%rsp)
0x0000555555735328 <+8>: mov (%rsp),%rax
=> 0x000055555573532c <+12>: cmpb $0x0,(%rax)