https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109883

            Bug ID: 109883
           Summary: Stack Overflow in <cmath> functions with <stdfloat>
                    types
           Product: gcc
           Version: 13.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: matt at mattborland dot com
  Target Milestone: ---

The two or more argument functions in <cmath> cause a stack overflow when
called with an <stdfloat> type and any integer type. Running with ASAN yields
"AddressSanitizer: nested bug in the same thread". I am able to reproduce this
bug on Fedora 38 with GCC 13.1.1 on x86_64, and macOS 13.3.1 with GCC 13.1.0 on
M1.

A minimal reproducer:

#include <stdfloat>
#include <cmath>

int main()
{
    std::pow(0.5F64, 2);
}

Reply via email to