{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/28180","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/28180/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/28180/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/28180/events","html_url":"https://github.com/rust-lang/rust/issues/28180","id":104600497,"number":28180,"title":"rustc: malloc.c:2388: sysmalloc: Assertion failed","user":{"login":"cuviper","id":36186,"avatar_url":"https://avatars.githubusercontent.com/u/36186?v=3","gravatar_id":"","url":"https://api.github.com/users/cuviper","html_url":"https://github.com/cuviper","followers_url":"https://api.github.com/users/cuviper/followers","following_url":"https://api.github.com/users/cuviper/following{/other_user}","gists_url":"https://api.github.com/users/cuviper/gists{/gist_id}","starred_url":"https://api.github.com/users/cuviper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuviper/subscriptions","organizations_url":"https://api.github.com/users/cuviper/orgs","repos_url":"https://api.github.com/users/cuviper/repos","events_url":"https://api.github.com/users/cuviper/events{/privacy}","received_events_url":"https://api.github.com/users/cuviper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-03T00:56:55Z","updated_at":"2015-09-03T00:58:40Z","closed_at":null,"body":"I was playing with examples for #28179 and hit this assertion in the playpen.\r\n\r\n```\r\nfn main() {\r\n  println!(\"ok\")\r\n}\r\n\r\n#[no_mangle]\r\n#[allow(non_snake_case)]\r\npub fn _ZN2io5stdio6_print20h94cd0587c9a534faX3gE() {\r\n    std::process::exit(1);\r\n}\r\n```\r\n\r\nThat `#[no_mangle]` function needs to clash with rust's `io::stdio::_print`.  This particular name is from stable 1.2. http://is.gd/YpEFlo\r\n\r\n```\r\nrustc: malloc.c:2388: sysmalloc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 *(sizeof(size_t))) - 1)) & ~((2 *(sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.\r\nAborted (core dumped)\r\nplaypen: application terminated with error code 134\r\n```"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/137287529","html_url":"https://github.com/rust-lang/rust/issues/28180#issuecomment-137287529","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/28180","id":137287529,"user":{"login":"cuviper","id":36186,"avatar_url":"https://avatars.githubusercontent.com/u/36186?v=3","gravatar_id":"","url":"https://api.github.com/users/cuviper","html_url":"https://github.com/cuviper","followers_url":"https://api.github.com/users/cuviper/followers","following_url":"https://api.github.com/users/cuviper/following{/other_user}","gists_url":"https://api.github.com/users/cuviper/gists{/gist_id}","starred_url":"https://api.github.com/users/cuviper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuviper/subscriptions","organizations_url":"https://api.github.com/users/cuviper/orgs","repos_url":"https://api.github.com/users/cuviper/repos","events_url":"https://api.github.com/users/cuviper/events{/privacy}","received_events_url":"https://api.github.com/users/cuviper/received_events","type":"User","site_admin":false},"created_at":"2015-09-03T00:58:40Z","updated_at":"2015-09-03T00:58:40Z","body":"Updating the mangled name for the current nightly gave me this: http://is.gd/4aWIX0\r\n\r\n```\r\nrustc: /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/llvm/include/llvm/Support/Casting.h:237: typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [with X = llvm::Function; Y = llvm::Value; typename llvm::cast_retty<X, Y*>::ret_type = llvm::Function*]: Assertion `isa<X>(Val) && \"cast<Ty>() argument of incompatible type!\"' failed.\r\nAborted (core dumped)\r\nplaypen: application terminated with error code 134\r\n```"}}