Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • eigen eigen
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 682
    • Issues 682
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Custom issue tracker
    • Custom issue tracker
  • Merge requests 20
    • Merge requests 20
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • libeigenlibeigen
  • eigeneigen
  • Issues
  • #508
Closed
Open
Issue created Dec 04, 2019 by Eigen Bugzilla@eigenbzReporter

Stack overflow with sqrt of an expression which returns a double (a 1x1 return type)

Submitted by Tom

Assigned to Nobody

Link to original bugzilla bug (#508)
Version: 3.1
Operating system: Windows

Description

int main(int argc, char* argv[])
{
Eigen::Vector2d v(1.0,2.0);
double d = sqrt(v.transpose() * v);
}

This triggers an infinite recursion/stack overflow when sqrt and sqrt_default_impl call each other.

Easy to work around--e.g. sqrt(v.dot(v));

Copied from the call stack:

Eigen::internal::sqrt_default_impl<Eigen::GeneralProduct<Eigen::Transpose<Eigen::Matrix<double,2,1,0,2,1> >,Eigen::Matrix<double,2,1,0,2,1>,3>,0>::run(const Eigen::GeneralProduct<Eigen::Transpose<Eigen::Matrix<double,2,1,0,2,1> >,Eigen::Matrix<double,2,1,0,2,1>,3> & x) Line 417 + 0xa bytes C++

Eigen::internal::sqrt<Eigen::GeneralProduct<Eigen::Transpose<Eigen::Matrix<double,2,1,0,2,1> >,Eigen::Matrix<double,2,1,0,2,1>,3> >(const Eigen::GeneralProduct<Eigen::Transpose<Eigen::Matrix<double,2,1,0,2,1> >,Eigen::Matrix<double,2,1,0,2,1>,3> & x)  Line 447 + 0xf bytes	C++  

Blocking

#387 (closed)

Edited Dec 05, 2019 by Eigen Bugzilla
Assignee
Assign to
Time tracking