Skip to content

rustc attempts to free ~ZeroSizeType #13360

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

Closed
thestinger opened this issue Apr 6, 2014 · 0 comments
Closed

rustc attempts to free ~ZeroSizeType #13360

thestinger opened this issue Apr 6, 2014 · 0 comments
Labels
I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Comments

@thestinger
Copy link
Contributor

fn main() {
    let x = &*~();
}

The issue is quite obvious from the IR of main:

define internal void @_ZN4main20h7189e541f51f5727eaa4v0.0E() unnamed_addr #4 {
entry-block:
  %x = alloca {}*
  %0 = call i8* @_ZN2rt11global_heap15exchange_malloc20hc8d73652038af38epaa4v0.0E(i64 0)
  %1 = bitcast i8* %0 to {}*
  store {}* %1, {}** %x
  %2 = bitcast {}* %1 to i8*
  call void @_ZN2rt11global_heap14exchange_free_20hbb0c3518bc13b1c2gca4v0.0E(i8* %2)
  ret void
}
@thestinger thestinger self-assigned this Apr 6, 2014
@thestinger thestinger removed their assignment Jun 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant