Skip to content

Integer literals >= 2^64 cause an ICE #5544

Closed
@dotdash

Description

@dotdash

Compiling the following code causes an ICE.

fn main() {
    18446744073709551616; // 2^64
}
rust: task failed at 'option::get none', /home/doener/src/rust/src/libcore/option.rs:120
/home/doener/rust/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x4b)[0x7fc8fa1b184b]
/home/doener/rust/bin/../lib/librustrt.so(+0x30319)[0x7fc8fa1c2319]
/home/doener/rust/bin/../lib/librustrt.so(upcall_fail+0x190)[0x7fc8fa1b3690]
/home/doener/rust/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so(+0x10a1ab)[0x7fc8f9dcd1ab]
/home/doener/rust/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so(+0x10a152)[0x7fc8f9dcd152]
/home/doener/rust/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so(_ZN3sys12begin_unwind16_701b8ec61f97ead3_06E+0x71)[0x7fc8f9d15841]
/home/doener/rust/bin/../lib/libsyntax-84efebcb12c867a2-0.6.so(+0x10cf25)[0x7fc8f971ef25]
/home/doener/rust/bin/../lib/libsyntax-84efebcb12c867a2-0.6.so(+0x102c55)[0x7fc8f9714c55]
/home/doener/rust/bin/../lib/libsyntax-84efebcb12c867a2-0.6.so(_ZN5parse5lexer14__extensions__10meth_1681410next_token17_46ecd451e4b6361c3_06E+0xba)[0x7fc8f971697a]
/home/doener/rust/bin/../lib/libsyntax-84efebcb12c867a2-0.6.so(_ZN5parse6parser14__extensions__10meth_174734bump17_cc8cd713cfdf7f6c3_06E+0x132)[0x7fc8f972bb32]
/home/doener/rust/bin/../lib/libsyntax-84efebcb12c867a2-0.6.so(+0x15b1e7)[0x7fc8f976d1e7]
/home/doener/rust/bin/../lib/libsyntax-84efebcb12c867a2-0.6.so(_ZN5parse6parser14__extensions__10meth_1841613parse_fn_decl16_847e1cb35da7f3f3_06E+0x15a)[0x7fc8f976ce1a]
/home/doener/rust/bin/../lib/libsyntax-84efebcb12c867a2-0.6.so(_ZN5parse6parser14__extensions__10meth_1855213parse_item_fn17_cb56601fe7e684633_06E+0x95)[0x7fc8f976ed05]
/home/doener/rust/bin/../lib/libsyntax-84efebcb12c867a2-0.6.so(_ZN5parse6parser14__extensions__10meth_1828923parse_item_or_view_item17_b7112d89c177a06a3_06E+0x1354)[0x7fc8f975f6c4]
/home/doener/rust/bin/../lib/libsyntax-84efebcb12c867a2-0.6.so(+0x2b08ac)[0x7fc8f98c28ac]
/home/doener/rust/bin/../lib/libsyntax-84efebcb12c867a2-0.6.so(_ZN5parse6parser14__extensions__10meth_1832926parse_items_and_view_items17_4cf5a4d3b7d634203_06E+0x836)[0x7fc8f97690d6]
/home/doener/rust/bin/../lib/libsyntax-84efebcb12c867a2-0.6.so(_ZN5parse6parser14__extensions__10meth_1868315parse_mod_items16_3aa5bd39291b4d43_06E+0x103)[0x7fc8f9777093]
/home/doener/rust/bin/../lib/libsyntax-84efebcb12c867a2-0.6.so(_ZN5parse6parser14__extensions__10meth_1901115parse_crate_mod16_4138d84126fc07b3_06E+0x19d)[0x7fc8f978d28d]
/home/doener/rust/bin/../lib/libsyntax-84efebcb12c867a2-0.6.so(_ZN5parse21parse_crate_from_file17_38b21f4bf6f75f523_06E+0x2b5)[0x7fc8f97b08b5]
/home/doener/rust/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6driver6driver11parse_input17_a3fbdc6919cc6b433_06E+0x12a)[0x7fc8f933c3aa]
/home/doener/rust/bin/../lib/librustc-c84825241471686d-0.6.so(+0x876272)[0x7fc8f9343272]
/home/doener/rust/bin/../lib/librustc-c84825241471686d-0.6.so(+0x874cbd)[0x7fc8f9341cbd]
/home/doener/rust/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6driver6driver12compile_upto15_21520a9e080fd23_06E+0xb8)[0x7fc8f9342ec8]
/home/doener/rust/bin/../lib/librustc-c84825241471686d-0.6.so(+0x8b4a84)[0x7fc8f9381a84]
/home/doener/rust/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6driver6driver13compile_input15_ae4c33c633a6213_06E+0xca)[0x7fc8f934335a]
/home/doener/rust/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN12run_compiler16_9519af6f87b57e43_06E+0x2141)[0x7fc8f9372e41]
/home/doener/rust/bin/../lib/librustc-c84825241471686d-0.6.so(+0x8b2551)[0x7fc8f937f551]
/home/doener/rust/bin/../lib/librustc-c84825241471686d-0.6.so(+0x8aed2c)[0x7fc8f937bd2c]
/home/doener/rust/bin/../lib/librustc-c84825241471686d-0.6.so(+0x8b4a84)[0x7fc8f9381a84]
/home/doener/rust/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so(+0xd3f8e)[0x7fc8f9d96f8e]
/home/doener/rust/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so(+0x152760)[0x7fc8f9e15760]
/home/doener/rust/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7fc8fa1b2094]
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /home/doener/src/rust/src/librustc/rustc.rc:359
/home/doener/rust/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x4b)[0x7fc8fa1b184b]
/home/doener/rust/bin/../lib/librustrt.so(+0x30319)[0x7fc8fa1c2319]
/home/doener/rust/bin/../lib/librustrt.so(upcall_fail+0x190)[0x7fc8fa1b3690]
/home/doener/rust/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so(+0x10a1ab)[0x7fc8f9dcd1ab]
/home/doener/rust/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so(+0x10a152)[0x7fc8f9dcd152]
/home/doener/rust/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so(_ZN3sys12begin_unwind16_701b8ec61f97ead3_06E+0x71)[0x7fc8f9d15841]
/home/doener/rust/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so(+0x152760)[0x7fc8f9e15760]
/home/doener/rust/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN7monitor15_916fc337c0fcac3_06E+0x1627)[0x7fc8f93754d7]
/home/doener/rust/bin/../lib/librustc-c84825241471686d-0.6.so(+0x8b4a84)[0x7fc8f9381a84]
/home/doener/rust/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN4main16_706f4ee7413ae583_06E+0x7e)[0x7fc8f938169e]
/home/doener/rust/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7fc8fa1b2094]
rust: domain main @0xf933c0 root task failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions