Skip to content

bigint add function cause Segmentation fault #10288

Closed
@ksh8281

Description

@ksh8281

i worked with rust(bf98981)

i try to use bigint module. but bigint.add function cause segfault in some cases.
the cases is below

extern mod extra;

use extra::bigint;
use extra::bigint::BigInt;
use extra::bigint::FromStr;
fn main() {
    let a:bigint::BigInt = FromStr::from_str("31").unwrap();
    let b:bigint::BigInt = FromStr::from_str("999999999999999999999999999999999999").unwrap();
    let c = (a+b).to_str();
    println(format!("{:?}",c));
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions