-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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)
compiler-errors, Noratrieb, clubby789 and jyn514lqd and y21
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.