-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Double free(?) when returning owned self #6682
Comments
This is actually not related to the return value, but just passing .type _ZN14__extensions__9meth_28651m17_7e6e9d6cd229cfd23_00E,@function
_ZN14__extensions__9meth_28651m17_7e6e9d6cd229cfd23_00E:
.cfi_startproc
cmpq %fs:112, %rsp
ja .LBB0_0
movabsq $40, %r10
movabsq $0, %r11
callq __morestack
ret
.LBB0_0:
pushq %rbp
.Ltmp2:
.cfi_def_cfa_offset 16
.Ltmp3:
.cfi_offset %rbp, -16
movq %rsp, %rbp
.Ltmp4:
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -16(%rbp)
jmp .LBB0_2
.LBB0_1:
addq $32, %rsp
popq %rbp
ret
.LBB0_2:
movq -16(%rbp), %rax
movq %rax, -24(%rbp)
movabsq $0, %rax
movq %rax, %rdi
movq %rax, %rsi
movq -24(%rbp), %rdx
callq _ZN9_ubox_u3217_d8e692bd4656d07e14glue_drop_2877E
jmp .LBB0_1
.Ltmp5:
.size _ZN14__extensions__9meth_28651m17_7e6e9d6cd229cfd23_00E, .Ltmp5-_ZN14__extensions__9meth_28651m17_7e6e9d6cd229cfd23_00E
|
dotdash
added a commit
to dotdash/rust
that referenced
this issue
Jun 2, 2013
For types that are passed by value, we can't just cast the value to a pointer, but have to use an alloca and copy the value there. This handling is already present for all other arguments, but was missing for "self". Fixes rust-lang#6682, rust-lang#4850 and rust-lang#4878
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Feb 11, 2021
Fix let_underscore_drop FP changelog: Fix let_underscore_drop false positives and negatives Fixes rust-lang#6633
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This crashes in free().
The text was updated successfully, but these errors were encountered: