Skip to content

upcall fail 'ty_size: unhandled type' in src/rustc/middle/trans/native.rs #2308

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
flaviusb opened this issue Apr 27, 2012 · 1 comment
Closed

Comments

@flaviusb
Copy link

When compiling the sqlite bindings for rust from https://github.com/linuxfood/rustsqlite/ I hit the error
error: internal compiler error unexpected failure.

I am running on Rust HEAD (43751e4).

When I run
RUST_LOG=rustc=0,::rt::backtrace rustc sqlite.rc after cloning linuxfood's rustsqlite repo, I get this as output:

rust: upcall fail 'ty_size: unhandled type', src/rustc/middle/trans/native.rs:104
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task4failEv+0x28)[0x7f04db110448]
/usr/local/bin/../lib/librustrt.so(+0x2c009)[0x7f04db124009]
/usr/local/bin/../lib/librustrt.so(upcall_fail+0x137)[0x7f04db113297]
/usr/local/bin/../lib/librustc-688fa7810161fd45-0.2.so(+0x121956)[0x7f04db473956]
/usr/local/bin/../lib/librustc-688fa7810161fd45-0.2.so(+0x12184b)[0x7f04db47384b]
/usr/local/bin/../lib/librustc-688fa7810161fd45-0.2.so(+0x1228e9)[0x7f04db4748e9]
/usr/local/bin/../lib/librustc-688fa7810161fd45-0.2.so(+0x12236c)[0x7f04db47436c]
/usr/local/bin/../lib/librustc-688fa7810161fd45-0.2.so(+0x124297)[0x7f04db476297]
/usr/local/bin/../lib/librustc-688fa7810161fd45-0.2.so(+0x1264d7)[0x7f04db4784d7]
/usr/local/bin/../lib/librustc-688fa7810161fd45-0.2.so(_ZN6middle5trans6native16trans_native_mod17_dc17af4b1c82a4f8202E+0x177)[0x7f04db4417c7]
/usr/local/bin/../lib/librustc-688fa7810161fd45-0.2.so(_ZN6middle5trans4base10trans_item17_845a71205311a633202E+0x11c6)[0x7f04db41c066]
/usr/local/bin/../lib/librustc-688fa7810161fd45-0.2.so(_ZN6middle5trans4base9trans_mod17_30dab49a877624cb202E+0x104)[0x7f04db4415b4]
/usr/local/bin/../lib/librustc-688fa7810161fd45-0.2.so(_ZN6middle5trans4base11trans_crate17_13dfc7dba4ba76da202E+0x1231)[0x7f04db44efd1]
/usr/local/bin/../lib/librustc-688fa7810161fd45-0.2.so(+0x392cdc)[0x7f04db6e4cdc]
/usr/local/bin/../lib/librustc-688fa7810161fd45-0.2.so(_ZN6driver6driver12compile_upto17_3ab2da55639870be202E+0x2c14)[0x7f04db6ca374]
/usr/local/bin/../lib/librustc-688fa7810161fd45-0.2.so(+0x392cdc)[0x7f04db6e4cdc]
/usr/local/bin/../lib/librustc-688fa7810161fd45-0.2.so(_ZN6driver6driver13compile_input17_886bcaf2bf8e4793202E+0xd4)[0x7f04db6cdf04]
rustc[0x406801]
rustc[0x40a158]
rustc[0x4095de]
rustc[0x409208]
/usr/local/bin/../lib/libcore-d27e4777a53c3e50-0.2.so(+0x30ac5)[0x7f04dc733ac5]
/usr/local/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x2b)[0x7f04db110d9b]
error: internal compiler error unexpected failure
note: The compiler hit an unexpected failure path. This is a bug. Try running with RUST_LOG=rustc=0,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: upcall fail 'explicit failure', src/rustc/driver/rustc.rs:226
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task4failEv+0x28)[0x7f04db110448]
/usr/local/bin/../lib/librustrt.so(+0x2c009)[0x7f04db124009]
/usr/local/bin/../lib/librustrt.so(upcall_fail+0x137)[0x7f04db113297]
rustc[0x408ba4]
rustc[0x40a158]
rustc[0x409b6a]
/usr/local/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x2b)[0x7f04db110d9b]
rust: domain main @0xbdfed0 root task failed

Output of uname -a is

Linux vvvvv 3.3.2-1-ARCH #1 SMP PREEMPT Sat Apr 14 09:48:37 CEST 2012 x86_64 Intel(R) Core(TM)2 Duo CPU T9400 @ 2.53GHz GenuineIntel GNU/Linux

I went digging in src/rustc/middle/trans/native.rs, and the problem seems to be that fn ty_size(ty: TypeRef) -> uint is being called with a TypeRef of type FunctionTyID (which gives an integer 11 in the alt).

I am not sure where to go with this from here, and have not been able to put together a minimal test case.

@flaviusb
Copy link
Author

flaviusb commented May 3, 2012

This is fixed in current head.

@flaviusb flaviusb closed this as completed May 3, 2012
bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
pointer tag tracking: on creation, log the offsets it is created for

Hopefully this makes things like Manishearth/triomphe#38 easier to diagnose.
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Signed-off-by: Felipe R. Monteiro <felisous@amazon.com>
jieyouxu pushed a commit to jieyouxu/rust that referenced this issue Apr 2, 2025
update rustc-{driver,interface} examples
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant