Skip to content

Assignment operator #5

Description

@filiatra

I am getting some random error when calling

std::vector<mpfr::mpreal>::insert

in the case that reallocation is triggered.

The memory check shows that the problem localizes inside the assignment operator

inline mpreal& mpreal::operator=(const mpreal& v)

and in particular there is an uninitialized conditional jump at

if(tp != vp){

Is there some scenario that would cause the variable

mp_prec_t vp = mpfr_get_prec(v.mpfr_srcptr());

to be uninitialized?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions